summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rlgl.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rlgl.h b/src/rlgl.h
index 0bbbf2fd..f2c796de 100644
--- a/src/rlgl.h
+++ b/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);