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
This commit is contained in:
reimar 2010-01-27 19:45:16 +00:00
parent 4526f4da65
commit 1a7b69f7f2
1 changed files with 2 additions and 2 deletions

View File

@ -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;