Merge pull request #1129 from mfrancis95/master

Apply @fabiangreffrath's patch to fix a memory error in Hexen
This commit is contained in:
Simon Howard 2019-01-23 15:01:30 -05:00 committed by GitHub
commit 2880809db9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -195,13 +195,8 @@ boolean SC_GetString(void)
} }
while (foundToken == false) while (foundToken == false)
{ {
while (*ScriptPtr <= 32) while (ScriptPtr < ScriptEndPtr && *ScriptPtr <= 32)
{ {
if (ScriptPtr >= ScriptEndPtr)
{
sc_End = true;
return false;
}
if (*ScriptPtr++ == '\n') if (*ScriptPtr++ == '\n')
{ {
sc_Line++; sc_Line++;