diff options
author | Andrei Karas <akaras@inbox.ru> | 2019-02-02 16:19:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2019-02-06 04:45:59 +0300 |
commit | 4fa93cb2f29b00a50c8c01ed3c8ce955147ffeed (patch) | |
tree | 35a36c094b24184d3f1841a5ec93d1309b2a39e5 /src/map/script.c | |
parent | 33952e448c3600e51829b57f63040e44a389ffbf (diff) | |
download | hercules-s20190211.tar.gz hercules-s20190211.tar.bz2 hercules-s20190211.tar.xz hercules-s20190211.zip |
Add missing check in run_script_mains20190211
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/script.c')
-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 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 ) |