Skip to content

Commit

Permalink
Merge pull request #1129 from mfrancis95/master
Browse files Browse the repository at this point in the history
Apply @fabiangreffrath's patch to fix a memory error in Hexen
  • Loading branch information
fragglet committed Jan 23, 2019
2 parents 4127fab + a3d41ba commit 2880809
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/hexen/sc_man.c
Expand Up @@ -195,13 +195,8 @@ boolean SC_GetString(void)
}
while (foundToken == false)
{
while (*ScriptPtr <= 32)
while (ScriptPtr < ScriptEndPtr && *ScriptPtr <= 32)
{
if (ScriptPtr >= ScriptEndPtr)
{
sc_End = true;
return false;
}
if (*ScriptPtr++ == '\n')
{
sc_Line++;
Expand Down

0 comments on commit 2880809

Please sign in to comment.