diff options
| author | brankoku <[email protected]> | 2020-02-28 02:23:05 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-02-28 08:23:05 +0100 |
| commit | 572969d8b7889856bf59a470c5ffe56a2d14761f (patch) | |
| tree | 3d47ac646742612769d6fc503edaf19102ac2c29 /src/rlgl.h | |
| parent | f2247c6f0a2c200937f40c09d829e48360d42df7 (diff) | |
| download | raylib-572969d8b7889856bf59a470c5ffe56a2d14761f.tar.gz raylib-572969d8b7889856bf59a470c5ffe56a2d14761f.zip | |
`LoadText()` tweak (#1113)
Guarantee string is zero-terminated
Diffstat (limited to 'src/rlgl.h')
| -rw-r--r-- | src/rlgl.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); |
