瀏覽代碼
Fix offset used before range check (#3021)
This use of offset 'i' should follow the range check.
pull/3023/head
Mingjie Shen
1 年之前
committed by
GitHub
沒有發現已知的金鑰在資料庫的簽署中
GPG Key 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] == '#') |
|
|
|
{ |
|
|
|