diff --git a/src/video/fbcon/SDL_fbvideo.c b/src/video/fbcon/SDL_fbvideo.c index 4ab77ee76..b3287ba84 100644 --- a/src/video/fbcon/SDL_fbvideo.c +++ b/src/video/fbcon/SDL_fbvideo.c @@ -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))