浏览代码
`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); |
|
|
|
|