Fixed compiler warning on newer Linux systems. stable-2.0
authorRyan C. Gordon <icculus@icculus.org>
Mon, 01 Feb 2010 03:02:18 -0500
branchstable-2.0
changeset 1028 69a19ed65049
parent 1022 38a62549ad4c
child 1043 44865546c38b
Fixed compiler warning on newer Linux systems. (transplanted from 3ab4702d6313b2590f202f1475cd68976765f02f)
test/test_physfs.c
--- a/test/test_physfs.c	Thu Jan 28 02:45:10 2010 -0500
+++ b/test/test_physfs.c	Mon Feb 01 03:02:18 2010 -0500
@@ -1116,7 +1116,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);