ref: f2e1b7d8683b46f9631b5f550605f396fcf21f65
parent: 8c91b31ae6f35fb26eee327d0d47feac95959f8e
author: ISSOtm <[email protected]>
date: Wed Oct 9 11:05:54 EDT 2019
Add EOF checking in string reading Fixes rednex/#422
--- a/src/link/object.c
+++ b/src/link/object.c
@@ -127,6 +127,8 @@
}
/* Read char */
str[index] = getc(file);
+ if (str[index] == EOF)
+ return NULL;
} while (str[index]);
return str;
}