From a410368d7ed203c59512c77832c4b0cab4a42e05 Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 17 Nov 2004 16:31:58 +0000 Subject: [PATCH] remove the only use of FS_Eof git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4766 d7cf8633-e32d-0410-b094-e92efae38249 --- host_cmd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/host_cmd.c b/host_cmd.c index dda37a1f..df867c23 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -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; -- 2.39.2