Merged r4433:4434 from branches/SDL-1.2: fbcon fgets() return value test fix.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 06 Jan 2010 07:45:58 +0000
changeset 3615 4a4371a7cd4f
parent 3614 701f54683b24
child 3616 0aaa7f52d1c6
Merged r4433:4434 from branches/SDL-1.2: fbcon fgets() return value test fix.
src/video/fbcon/SDL_fbvideo.c
--- a/src/video/fbcon/SDL_fbvideo.c	Wed Jan 06 07:39:35 2010 +0000
+++ b/src/video/fbcon/SDL_fbvideo.c	Wed Jan 06 07:45:58 2010 +0000
@@ -314,7 +314,7 @@
     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))