test/test_physfs.c
branchstable-1.0
changeset 1029 acf57e7114eb
parent 964 455ef8c1ebf0
--- 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);