foxygit / doom Log in
commit a3d41baca4d77441fa55b1d8f9963004667068d0
Author:     mfrancis95 <mikefrancis95@gmail.com>
AuthorDate: Tue Jan 8 15:10:11 2019 -0500
Commit:     mfrancis95 <mikefrancis95@gmail.com>
CommitDate: Tue Jan 8 15:10:11 2019 -0500

    Remove redundancy in previous commit
---
 src/hexen/sc_man.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/hexen/sc_man.c b/src/hexen/sc_man.c
index 1ebd1700..489bc72e 100644
--- a/src/hexen/sc_man.c
+++ b/src/hexen/sc_man.c
@@ -195,18 +195,13 @@ boolean SC_GetString(void)
     }
     while (foundToken == false)
     {
-        while (*ScriptPtr <= 32)
+        while (ScriptPtr < ScriptEndPtr && *ScriptPtr <= 32)
         {
             if (*ScriptPtr++ == '\n')
             {
                 sc_Line++;
                 sc_Crossed = true;
             }
-            if (ScriptPtr >= ScriptEndPtr)
-            {
-                sc_End = true;
-                return false;
-            }
         }
         if (ScriptPtr >= ScriptEndPtr)
         {