More sanity checks.

This commit is contained in:
Hisham Muhammad 2014-04-24 19:54:06 -03:00
parent 27da00f339
commit 9eec37c432

View File

@ -85,9 +85,10 @@ static unsigned long int parseBatInfo(const char *fileName, const unsigned short
break;
}
char line[50];
char line[50] = "";
for (unsigned short int i = 0; i < lineNum; i++) {
fgets(line, sizeof line, file);
char* ok = fgets(line, sizeof line, file);
if (!ok) break;
}
fclose(file);