]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Fixed fgets (before it has been ignoring the line that contained the EOF char).
authorblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 6 Sep 2004 10:36:28 +0000 (10:36 +0000)
committerblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 6 Sep 2004 10:36:28 +0000 (10:36 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4440 d7cf8633-e32d-0410-b094-e92efae38249

pr_cmds.c
prvm_cmds.c

index 217bc7d5e5dd7e93523fc77e6ee0de18f34679fb..3465c47399f35d2a8320d6176e415b8bae3505f4 100644 (file)
--- 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;
index 67cd6f9af97bbfe018e211cd9168c2708cf1a9c6..4991e6ed75728b910f2f9e4daa177732724ca8b5 100644 (file)
@@ -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;