remove the only use of FS_Eof
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 17 Nov 2004 16:31:58 +0000 (16:31 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 17 Nov 2004 16:31:58 +0000 (16:31 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4766 d7cf8633-e32d-0410-b094-e92efae38249

host_cmd.c

index dda37a1..df867c2 100644 (file)
@@ -636,7 +636,7 @@ void Host_Loadgame_f (void)
 // load the edicts out of the savegame file
        // -1 is the globals
        entnum = -1;
-       while (!FS_Eof (f))
+       for (;;)
        {
                for (i = 0;i < (int)sizeof(buf) - 1;i++)
                {
@@ -650,6 +650,8 @@ void Host_Loadgame_f (void)
                                break;
                        }
                }
+               if (r == EOF)
+                       break;
                if (i == sizeof(buf)-1)
                        Host_Error ("Loadgame buffer overflow");
                buf[i] = 0;