ソースを参照
`LoadText()` tweak (#1113)
Guarantee string is zero-terminated
pull/1118/head
brankoku
5年前
committed by
GitHub
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: 4AEE18F83AFDEB23
-
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); |
|
|
|
|