From c7980f7b24c4037fc5d43b0e3cadbcc3a678ca86 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 2 Feb 2019 16:19:23 +0300 Subject: Add missing check in run_script_main --- src/map/script.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/map/script.c b/src/map/script.c index 14623bac7..be591a3ae 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -4621,6 +4621,9 @@ static void run_script_main(struct script_state *st) nullpo_retv(st); script->attach_state(st); + if (st->state != END && Assert_chk(st->state == RUN || st->state == STOP || st->state == RERUNLINE)) { + st->state = END; + } nd = map->id2nd(st->oid); if( nd && nd->bl.m >= 0 ) -- cgit v1.2.3-70-g09d2