Fix a major bug where "enda" could be used to terminate an event, resulting in all kinds of issues.

git-svn-id: https://svn.eduke32.com/eduke32@5507 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2016-01-07 03:29:44 +00:00
parent 1cc28df380
commit 96ab0aba08

View file

@ -5901,11 +5901,12 @@ repeatcase:
continue;
case CON_ENDA:
if (EDUKE32_PREDICT_FALSE(g_parsingActorPtr == NULL))
if (EDUKE32_PREDICT_FALSE(g_parsingActorPtr == NULL || g_parsingEventPtr))
{
C_ReportError(-1);
initprintf("%s:%d: error: found `enda' without open `actor'.\n",g_szScriptFileName,g_lineNumber);
g_numCompilerErrors++;
g_parsingEventPtr = NULL;
}
if (EDUKE32_PREDICT_FALSE(g_numBraces != 0))
{