瀏覽代碼
`LoadText()` tweak (#1113)
Guarantee string is zero-terminated
pull/1118/head
brankoku
5 年之前
committed by
GitHub
沒有發現已知的金鑰在資料庫的簽署中
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); |
|
|
|