瀏覽代碼

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
父節點
當前提交
7b7c0c83ef
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      examples/shapes/raygui.h

+ 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] == '#')
{

||||||
x
 
000:0
Loading…
取消
儲存