summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-02-02 16:19:23 +0300
committerAndrei Karas <akaras@inbox.ru>2019-02-06 04:45:59 +0300
commit4fa93cb2f29b00a50c8c01ed3c8ce955147ffeed (patch)
tree35a36c094b24184d3f1841a5ec93d1309b2a39e5
parent33952e448c3600e51829b57f63040e44a389ffbf (diff)
downloadhercules-4fa93cb2f29b00a50c8c01ed3c8ce955147ffeed.tar.gz
hercules-4fa93cb2f29b00a50c8c01ed3c8ce955147ffeed.tar.bz2
hercules-4fa93cb2f29b00a50c8c01ed3c8ce955147ffeed.tar.xz
hercules-4fa93cb2f29b00a50c8c01ed3c8ce955147ffeed.zip
Add missing check in run_script_mains20190211
Signed-off-by: Haru <haru@dotalux.com>
-rw-r--r--src/map/script.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 841e21169..db27394c9 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 )