summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rlgl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rlgl.h b/src/rlgl.h
index ce6fdaf5..03aaf625 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -3004,7 +3004,7 @@ char *LoadText(const char *fileName)
{
text = (char *)RL_MALLOC(sizeof(char)*(size + 1));
int count = fread(text, sizeof(char), size, textFile);
- text[count] = '\0';
+ if (size == count) text[count] = '\0';
}
fclose(textFile);