diff options
author | Andrei Karas <akaras@inbox.ru> | 2019-02-02 16:19:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2019-02-04 20:32:21 +0300 |
commit | c7980f7b24c4037fc5d43b0e3cadbcc3a678ca86 (patch) | |
tree | b90407312fb789bb329b85d8e05d19b2de4b4a6e /src | |
parent | 5182ecdd2649f43644a2e8767ad8f016e62bd8f7 (diff) | |
download | hercules-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')
-rw-r--r-- | src/map/script.c | 3 |
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 ) |