2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-01-29 15:08:07 +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 IsComment(char *pText)
{ {
int length;
if (!pText) if (!pText)
{
return TRUE; return TRUE;
}
length = Q_strlen(pText); #ifdef REHLDS_FIXES
if (length >= 2 && pText[0] == '/' && pText[1] == '/' || length <= 0) 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; return TRUE;
} }
#endif
return FALSE; return FALSE;
} }