Browse Source
`LoadText()` tweak (#1113)
Guarantee string is zero-terminated
pull/1118/head
brankoku
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
1 deletions
-
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); |
|
|
|