changeset 30405:d39acea63f2e

Simplify and correct loop condition, also avoids a compiler warning for unused result.
author reimar
date Wed, 27 Jan 2010 19:45:16 +0000
parents 5fbb30fa62cc
children 36c0fd3c17c4
files gui/skin/font.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gui/skin/font.c	Wed Jan 27 19:42:24 2010 +0000
+++ b/gui/skin/font.c	Wed Jan 27 19:45:16 2010 +0000
@@ -83,9 +83,9 @@
  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;