Fixed compiler warning on newer Linux systems. stable-1.0
authorRyan C. Gordon <icculus@icculus.org>
Mon, 01 Feb 2010 03:02:18 -0500
branchstable-1.0
changeset 1029 acf57e7114eb
parent 1023 024b940b32a9
child 1058 4d810db600de
Fixed compiler warning on newer Linux systems. (transplanted from 3ab4702d6313b2590f202f1475cd68976765f02f)
test/test_physfs.c
--- a/test/test_physfs.c	Thu Jan 28 02:45:58 2010 -0500
+++ b/test/test_physfs.c	Mon Feb 01 03:02:18 2010 -0500
@@ -1066,7 +1066,9 @@
 
         do
         {
-            fgets(buf, sizeof (buf), f);
+            if (fgets(buf, sizeof (buf), f) == NULL)
+                break;
+
             if (buf[strlen(buf) - 1] == '\n')
                 buf[strlen(buf) - 1] = '\0';
             add_history(buf);