Quellcode durchsuchen
Fix offset used before range check (#3021)
This use of offset 'i' should follow the range check.
pull/3023/head
Mingjie Shen
vor 2 Jahren
committed von
GitHub
Ursprung
Commit
7b7c0c83ef
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
1 geänderte Dateien mit
1 neuen und
1 gelöschten Zeilen
-
examples/shapes/raygui.h
|
|
|
@ -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] == '#') |
|
|
|
{ |
|
|
|
|