Commit 4f75dd55 authored by Ryan C. Gordon's avatar Ryan C. Gordon

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

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404366
parent 65a38589
...@@ -314,7 +314,7 @@ read_fbmodes_line(FILE * f, char *line, int length) ...@@ -314,7 +314,7 @@ read_fbmodes_line(FILE * f, char *line, int length)
blank = 0; blank = 0;
/* find a relevant line */ /* find a relevant line */
do { do {
if (fgets(line, length, f) <= 0) if (!fgets(line, length, f))
return 0; return 0;
c = line; c = line;
while (((*c == '\t') || (*c == ' ')) && (*c != 0)) while (((*c == '\t') || (*c == ' ')) && (*c != 0))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment