aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2020-05-19 15:11:34 +0200
committerArisotura <thetotalworm@gmail.com>2020-05-19 15:11:34 +0200
commit920ff9778d3fbdd18576ab473cca6212ee387cb1 (patch)
tree7070cb60babd676bfb9328ca3893e506fa4003c8
parent4b038f5d370c961803666f418ebfeb775cfa2d2a (diff)
blarg
-rw-r--r--src/Config.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Config.cpp b/src/Config.cpp
index 7604785..84c83d8 100644
--- a/src/Config.cpp
+++ b/src/Config.cpp
@@ -90,7 +90,8 @@ void Load()
while (!feof(f))
{
fgets(linebuf, 1024, f);
- int ret = sscanf(linebuf, "%32[A-Za-z_0-9]=%[^\t\n]", entryname, entryval);
+ int ret = sscanf(linebuf, "%31[A-Za-z_0-9]=%[^\t\n]", entryname, entryval);
+ entryname[31] = '\0';
if (ret < 2) continue;
ConfigEntry* entry = &ConfigFile[0];