]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host_cmd.c
-Fixed a bug in drawstring - it used maxlen instead of len in a validity check
[xonotic/darkplaces.git] / host_cmd.c
index dda37a1f23d328f3b1598121f924ac889066b7cb..d3fcd5f659097a879f62264b03a39cb3b245f9f9 100644 (file)
@@ -636,8 +636,9 @@ void Host_Loadgame_f (void)
 // load the edicts out of the savegame file
        // -1 is the globals
        entnum = -1;
-       while (!FS_Eof (f))
+       for (;;)
        {
+               r = EOF;
                for (i = 0;i < (int)sizeof(buf) - 1;i++)
                {
                        r = FS_Getc (f);
@@ -650,6 +651,8 @@ void Host_Loadgame_f (void)
                                break;
                        }
                }
+               if (r == EOF)
+                       break;
                if (i == sizeof(buf)-1)
                        Host_Error ("Loadgame buffer overflow");
                buf[i] = 0;