Fix some compiler warnings

This commit is contained in:
WaluigiWare64
2021-05-03 13:36:21 +01:00
parent cc36f55b8c
commit 2ff065e5ea
17 changed files with 69 additions and 52 deletions

View File

@ -119,7 +119,9 @@ void Load()
char entryval[1024];
while (!feof(f))
{
fgets(linebuf, 1024, f);
if (fgets(linebuf, 1024, f) == NULL)
printf("Error reading string from file!");
int ret = sscanf(linebuf, "%31[A-Za-z_0-9]=%[^\t\r\n]", entryname, entryval);
entryname[31] = '\0';
if (ret < 2) continue;