mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-15 15:58:14 +00:00
[text] TextLength() security check
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user