diff options
Diffstat (limited to 'src/ARCodeFile.cpp')
-rw-r--r-- | src/ARCodeFile.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ARCodeFile.cpp b/src/ARCodeFile.cpp index d92c078..2510b6e 100644 --- a/src/ARCodeFile.cpp +++ b/src/ARCodeFile.cpp @@ -60,7 +60,9 @@ bool ARCodeFile::Load() char linebuf[1024]; while (!feof(f)) { - fgets(linebuf, 1024, f); + if (fgets(linebuf, 1024, f) == NULL) + printf("Error reading string from file!"); + linebuf[1023] = '\0'; char* start = linebuf; |