[text] TextLength() security check

This commit is contained in:
Ray 2020-02-17 00:47:05 +01:00
parent df4b55d657
commit 39e73ccc4d

View File

@ -1147,7 +1147,10 @@ unsigned int TextLength(const char *text)
{
unsigned int length = 0; //strlen(text)
while (*text++) length++;
if (text != NULL)
{
while (*text++) length++;
}
return length;
}