From 1a7b69f7f2e670b7c09baddbdd619db72091e647 Mon Sep 17 00:00:00 2001 From: reimar Date: Wed, 27 Jan 2010 19:45:16 +0000 Subject: Simplify and correct loop condition, also avoids a compiler warning for unused result. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30447 b3059339-0415-0410-9bf9-f77b7e298cf2 --- gui/skin/font.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gui/skin') diff --git a/gui/skin/font.c b/gui/skin/font.c index e3f1bee5cc..2da2148c41 100644 --- a/gui/skin/font.c +++ b/gui/skin/font.c @@ -83,9 +83,9 @@ int fntRead( char * path,char * fname ) if ( ( f=fopen( tmp,"rt" ) ) == NULL ) { free( Fonts[id] ); return -3; } - while ( !feof( f ) ) + while ( fgets( tmp,255,f ) ) { - fgets( tmp,255,f ); linenumber++; + linenumber++; // remove any kind of newline, if any tmp[strcspn(tmp, "\n\r")] = 0; -- cgit v1.2.3