Fix Cmd_TokenizeString2 incorrectly ignoring extended ascii characters
Some checks failed
CodeQL / Analyze (push) Waiting to run
Build branch / build-all (push) Failing after 17s

This commit is contained in:
smallmodel 2024-12-09 22:33:36 +01:00
parent 231553f574
commit 8a84436d1b
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -667,7 +667,7 @@ static void Cmd_TokenizeString2( const char *text_in, qboolean ignoreQuotes ) {
while ( 1 ) {
// skip whitespace
while ( *text && *text <= ' ' ) {
while ( *text && ( unsigned char )*text <= ' ' ) {
text++;
}
if ( !*text ) {
@ -715,7 +715,7 @@ static void Cmd_TokenizeString2( const char *text_in, qboolean ignoreQuotes ) {
cmd_argc++;
// skip until whitespace, quote, or command
while ( *text > ' ' ) {
while ( ( unsigned char )*text > ' ' ) {
if ( !ignoreQuotes && text[0] == '"' ) {
break;
}