mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-16 08:18: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)
|
unsigned int length = 0; //strlen(text)
|
||||||
|
|
||||||
|
if (text != NULL)
|
||||||
|
{
|
||||||
while (*text++) length++;
|
while (*text++) length++;
|
||||||
|
}
|
||||||
|
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user