From 96ab0aba08c90027b93ec2235005284f386decd1 Mon Sep 17 00:00:00 2001 From: terminx Date: Thu, 7 Jan 2016 03:29:44 +0000 Subject: [PATCH] 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 --- polymer/eduke32/source/gamedef.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index fb4fa0689..920cb688b 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -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)) {