summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-02-02 16:19:23 +0300
committerAndrei Karas <akaras@inbox.ru>2019-02-04 20:32:21 +0300
commitc7980f7b24c4037fc5d43b0e3cadbcc3a678ca86 (patch)
treeb90407312fb789bb329b85d8e05d19b2de4b4a6e /src/map/script.c
parent5182ecdd2649f43644a2e8767ad8f016e62bd8f7 (diff)
downloadhercules-c7980f7b24c4037fc5d43b0e3cadbcc3a678ca86.tar.gz
hercules-c7980f7b24c4037fc5d43b0e3cadbcc3a678ca86.tar.bz2
hercules-c7980f7b24c4037fc5d43b0e3cadbcc3a678ca86.tar.xz
hercules-c7980f7b24c4037fc5d43b0e3cadbcc3a678ca86.zip
Add missing check in run_script_main
Diffstat (limited to 'src/map/script.c')
-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 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 )