From 629834c8a636eb995577b4fa38b4c933c4cd72ce Mon Sep 17 00:00:00 2001 From: Spoike Date: Tue, 14 Mar 2006 01:15:42 +0000 Subject: [PATCH] Should give more accurate results. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2107 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/common/common.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/engine/common/common.c b/engine/common/common.c index df78ccfc4..745def516 100644 --- a/engine/common/common.c +++ b/engine/common/common.c @@ -1882,14 +1882,20 @@ const char *COM_ParseToken (const char *data, const char *punctuation) com_token[0] = 0; if (!data) + { + com_tokentype = TTP_UNKNOWN; return NULL; + } // skip whitespace skipwhite: - while ( (c = *data) <= ' ') + while ( (c = *(unsigned char*)data) <= ' ') { if (c == 0) + { + com_tokentype = TTP_UNKNOWN; return NULL; // end of file; + } data++; }