engine: ensure character signness when checking for nonprintable characters
This commit is contained in:
parent
32d4bdb80f
commit
870e47ed03
4 changed files with 4 additions and 4 deletions
|
@ -844,7 +844,7 @@ static void CL_QuakeExecStuff( void )
|
|||
while( 1 )
|
||||
{
|
||||
// skip whitespace up to a /n
|
||||
while( *text && ((byte)*text) <= ' ' && *text != '\r' && *text != '\n' )
|
||||
while( *text && ((byte)*text ) <= ' ' && *text != '\r' && *text != '\n' )
|
||||
text++;
|
||||
|
||||
if( *text == '\n' || *text == '\r' )
|
||||
|
|
|
@ -553,7 +553,7 @@ static void Key_AddKeyCommands( int key, const char *kb, qboolean down )
|
|||
}
|
||||
|
||||
buttonPtr = button;
|
||||
while(( kb[i] <= ' ' || kb[i] == ';' ) && kb[i] != 0 )
|
||||
while((((byte)kb[i]) <= ' ' || kb[i] == ';' ) && kb[i] != 0 )
|
||||
i++;
|
||||
}
|
||||
|
||||
|
|
|
@ -640,7 +640,7 @@ void Cmd_TokenizeString( const char *text )
|
|||
while( 1 )
|
||||
{
|
||||
// skip whitespace up to a /n
|
||||
while( *text && *text <= ' ' && *text != '\r' && *text != '\n' )
|
||||
while( *text && ((byte)*text ) <= ' ' && *text != '\r' && *text != '\n' )
|
||||
text++;
|
||||
|
||||
if( *text == '\n' || *text == '\r' )
|
||||
|
|
|
@ -256,7 +256,7 @@ void GAME_EXPORT SV_SetModel( edict_t *ent, const char *modelname )
|
|||
return;
|
||||
}
|
||||
|
||||
if( !modelname || modelname[0] <= ' ' )
|
||||
if( !modelname || ((byte)modelname[0] ) <= ' ' )
|
||||
{
|
||||
Con_Printf( S_WARN "SV_SetModel: null name\n" );
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue