Merged r4433:4434 from branches/SDL-1.2: fbcon fgets() return value test fix.

This commit is contained in:
Ryan C. Gordon
2010-01-06 07:45:58 +00:00
parent d3e020766d
commit b4ed725c0b

View File

@@ -314,7 +314,7 @@ read_fbmodes_line(FILE * f, char *line, int length)
blank = 0;
/* find a relevant line */
do {
if (fgets(line, length, f) <= 0)
if (!fgets(line, length, f))
return 0;
c = line;
while (((*c == '\t') || (*c == ' ')) && (*c != 0))