From c6246fb4b0d0d29d34082fe802b1cf2c8f970937 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 Signed-off-by: Haru --- src/map/script.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/map/script.c b/src/map/script.c index 25bf59839..ccd5eedcc 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