test/test_physfs.c
branchstable-2.0
changeset 1028 69a19ed65049
parent 956 3da716cfe09f
child 1082 94771621792f
--- 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);