2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-01-27 22:18:08 +03:00

Update IsComment (#433)

Refactor IsComment.
This commit is contained in:
In-line 2017-04-23 16:19:56 +04:00 committed by Lev
parent d4e76672e6
commit 7efc256c7c

View File

@ -115,17 +115,19 @@ char* EXT_FUNC memfgets(unsigned char *pMemFile, int fileSize, int *pFilePos, ch
int IsComment(char *pText)
{
int length;
if (!pText)
{
return TRUE;
}
length = Q_strlen(pText);
if (length >= 2 && pText[0] == '/' && pText[1] == '/' || length <= 0)
#ifdef REHLDS_FIXES
if ((pText[0] == '/' && pText[1] == '/') || !pText[0])
return TRUE;
#else
int length = Q_strlen(pText);
if ((length >= 2 && pText[0] == '/' && pText[1] == '/') || length <= 0)
{
return TRUE;
}
}
#endif
return FALSE;
}