소스 검색

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
No known key found for this signature in database 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] == '#')
{

불러오는 중...
취소
저장