Should give more accurate results.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2107 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2006-03-14 01:15:42 +00:00
parent 8f496bef67
commit 629834c8a6

View file

@ -1882,14 +1882,20 @@ const char *COM_ParseToken (const char *data, const char *punctuation)
com_token[0] = 0; com_token[0] = 0;
if (!data) if (!data)
{
com_tokentype = TTP_UNKNOWN;
return NULL; return NULL;
}
// skip whitespace // skip whitespace
skipwhite: skipwhite:
while ( (c = *data) <= ' ') while ( (c = *(unsigned char*)data) <= ' ')
{ {
if (c == 0) if (c == 0)
{
com_tokentype = TTP_UNKNOWN;
return NULL; // end of file; return NULL; // end of file;
}
data++; data++;
} }