소스 검색
`LoadText()` tweak (#1113)
Guarantee string is zero-terminated
pull/1118/head
brankoku
5 년 전
committed by
GitHub
No known key found for this signature in database
GPG 키 ID: 4AEE18F83AFDEB23
1개의 변경된 파일과
3개의 추가작업 그리고
1개의 파일을 삭제
-
src/rlgl.h
|
|
@ -3013,8 +3013,10 @@ char *LoadText(const char *fileName) |
|
|
|
if (count < size) |
|
|
|
{ |
|
|
|
text = RL_REALLOC(text, count + 1); |
|
|
|
text[count] = '\0'; |
|
|
|
} |
|
|
|
|
|
|
|
// zero-terminate the string |
|
|
|
text[count] = '\0'; |
|
|
|
} |
|
|
|
|
|
|
|
fclose(textFile); |
|
|
|