shithub: choc

Download patch

ref: a3d41baca4d77441fa55b1d8f9963004667068d0
parent: 52c49e45fb8da3dc0fa7c9d26d34c39b4a7cbc71
author: mfrancis95 <mikefrancis95@gmail.com>
date: Tue Jan 8 10:10:11 EST 2019

Remove redundancy in previous commit

--- a/src/hexen/sc_man.c
+++ b/src/hexen/sc_man.c
@@ -195,17 +195,12 @@
     }
     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)