[iortcw] 26/95: All: Do a proper check for hex strings in cl_consoleKeys

Simon McVittie smcv at debian.org
Fri Sep 8 10:41:53 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to tag 1.51
in repository iortcw.

commit 29bc1e8866f7d59a6c06335c2a475d4a3690dc11
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date:   Sun Feb 5 05:24:40 2017 -0500

    All: Do a proper check for hex strings in cl_consoleKeys
    
    Probably a little better than a4b3312
---
 MP/code/sdl/sdl_input.c | 2 +-
 SP/code/sdl/sdl_input.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/MP/code/sdl/sdl_input.c b/MP/code/sdl/sdl_input.c
index 4920467..dad153c 100644
--- a/MP/code/sdl/sdl_input.c
+++ b/MP/code/sdl/sdl_input.c
@@ -136,7 +136,7 @@ static qboolean IN_IsConsoleKey( keyNum_t key, int character )
 			if( !token[ 0 ] )
 				break;
 
-			if( strlen( token ) >= 4 )
+			if ( !Q_strncmp( token, "0x", 2 ) )
 				charCode = Com_HexStrToInt( token );
 
 			if( charCode > 0 )
diff --git a/SP/code/sdl/sdl_input.c b/SP/code/sdl/sdl_input.c
index 4920467..dad153c 100644
--- a/SP/code/sdl/sdl_input.c
+++ b/SP/code/sdl/sdl_input.c
@@ -136,7 +136,7 @@ static qboolean IN_IsConsoleKey( keyNum_t key, int character )
 			if( !token[ 0 ] )
 				break;
 
-			if( strlen( token ) >= 4 )
+			if ( !Q_strncmp( token, "0x", 2 ) )
 				charCode = Com_HexStrToInt( token );
 
 			if( charCode > 0 )

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git



More information about the Pkg-games-commits mailing list