mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-19 09:48:15 +00:00
Fix offset used before range check (#3021)
This use of offset 'i' should follow the range check.
This commit is contained in:
@@ -3743,7 +3743,7 @@ static int GetTextWidth(const char *text)
|
||||
{
|
||||
if (text[0] == '#')
|
||||
{
|
||||
for (int i = 1; (text[i] != '\0') && (i < 5); i++)
|
||||
for (int i = 1; (i < 5) && (text[i] != '\0'); i++)
|
||||
{
|
||||
if (text[i] == '#')
|
||||
{
|
||||
|
Reference in New Issue
Block a user