소스 검색
Fix offset used before range check (#3021)
This use of offset 'i' should follow the range check.
pull/3023/head
Mingjie Shen
2 년 전
committed by
GitHub
No known key found for this signature in database
GPG 키 ID: 4AEE18F83AFDEB23
1개의 변경된 파일과
1개의 추가작업 그리고
1개의 파일을 삭제
-
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] == '#') |
|
|
|
{ |
|
|
|