]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_cmds.c
fix whitespace handling:
[xonotic/darkplaces.git] / prvm_cmds.c
index 696ffea0439643df575f5b301f9025f7e9dd2c91..63f17f2909a97d1fdebe64bdd97ebbdd0adfb492 100644 (file)
@@ -45,7 +45,7 @@ void VM_Warning(const char *fmt, ...)
 
 void VM_CheckEmptyString (const char *s)
 {
-       if (s[0] <= ' ')
+       if (ISWHITESPACE(s[0]))
                PRVM_ERROR ("%s: Bad string", PRVM_NAME);
 }
 
@@ -2291,7 +2291,7 @@ void VM_tokenize (void)
                        break;
 
                // skip whitespace here to find token start pos
-               while(*p && (unsigned char) *p <= ' ')
+               while(*p && ISWHITESPACE(*p))
                        ++p;
 
                tokens_startpos[num_tokens] = p - string;
@@ -2323,7 +2323,7 @@ void VM_tokenize_console (void)
                        break;
 
                // skip whitespace here to find token start pos
-               while(*p && (unsigned char) *p <= ' ')
+               while(*p && ISWHITESPACE(*p))
                        ++p;
 
                tokens_startpos[num_tokens] = p - string;