2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-29 08:05:50 +03:00

COM_ParseLine: Turn on preprocessor REHLDS_FIXES. Related #67

This commit is contained in:
s1lent 2019-09-06 00:03:18 +07:00
parent 4e4690bd6b
commit 262f443404
No known key found for this signature in database
GPG Key ID: 0FE401DC73916B5C

View File

@ -1571,7 +1571,7 @@ inquotes:
char *COM_ParseLine(char *data) char *COM_ParseLine(char *data)
{ {
#ifndef REHLDS_FIXES #ifdef REHLDS_FIXES
unsigned int c; unsigned int c;
#else #else
int c; int c;
@ -1595,7 +1595,7 @@ char *COM_ParseLine(char *data)
c = *data; c = *data;
// parse a line out of the data // parse a line out of the data
#ifndef REHLDS_FIXES #ifdef REHLDS_FIXES
while ((c >= ' ' || c == '\t') && (len < COM_TOKEN_LEN - 1)) while ((c >= ' ' || c == '\t') && (len < COM_TOKEN_LEN - 1))
{ {
com_token[len] = c; com_token[len] = c;
@ -1620,7 +1620,7 @@ char *COM_ParseLine(char *data)
return NULL; return NULL;
} }
// eat whitespace (LF,CR,etc.) at the end of this line // skip end of the line (CR, LF, etc.., but not TAB)
while ((c = *data) < ' ' && c != '\t') while ((c = *data) < ' ' && c != '\t')
{ {
if (c == 0) if (c == 0)