From 10cbf943be46f1b52c0133bdc18a6c3f408b6c66 Mon Sep 17 00:00:00 2001 From: black Date: Mon, 6 Sep 2004 10:36:28 +0000 Subject: [PATCH] Fixed fgets (before it has been ignoring the line that contained the EOF char). git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4440 d7cf8633-e32d-0410-b094-e92efae38249 --- pr_cmds.c | 2 +- prvm_cmds.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pr_cmds.c b/pr_cmds.c index 217bc7d5..3465c473 100644 --- a/pr_cmds.c +++ b/pr_cmds.c @@ -2933,7 +2933,7 @@ void PF_fgets(void) c = FS_Getc(pr_files[filenum]); if (developer.integer) Con_Printf("fgets: %s\n", string); - if (c >= 0) + if (c >= 0 || end) G_INT(OFS_RETURN) = PR_SetString(string); else G_INT(OFS_RETURN) = 0; diff --git a/prvm_cmds.c b/prvm_cmds.c index 67cd6f9a..4991e6ed 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -1826,7 +1826,7 @@ void VM_fgets(void) c = FS_Getc(VM_FILES[filenum]); if (developer.integer) Con_Printf("fgets: %s: %s\n", PRVM_NAME, string); - if (c >= 0) + if (c >= 0 || end) PRVM_G_INT(OFS_RETURN) = PRVM_SetString(string); else PRVM_G_INT(OFS_RETURN) = 0; -- 2.39.2