summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2015-04-23 12:33:38 -0400
committermekolat <mekolat@users.noreply.github.com>2015-04-27 23:04:16 -0400
commit9a1b2394ebd9707042aa56862dd35863ff7f3568 (patch)
treea025e0a33b60a17511802b7812b24d2eec565ae1
parente6ee7b3f99935a594e6462472fdc9d075408da0f (diff)
downloadtmwa-9a1b2394ebd9707042aa56862dd35863ff7f3568.tar.gz
tmwa-9a1b2394ebd9707042aa56862dd35863ff7f3568.tar.bz2
tmwa-9a1b2394ebd9707042aa56862dd35863ff7f3568.tar.xz
tmwa-9a1b2394ebd9707042aa56862dd35863ff7f3568.zip
make freeloop check the value
-rw-r--r--src/map/script-call.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/script-call.cpp b/src/map/script-call.cpp
index f412328..c3c6aa1 100644
--- a/src/map/script-call.cpp
+++ b/src/map/script-call.cpp
@@ -757,7 +757,7 @@ void run_script_main(ScriptState *st, Borrowed<const ScriptBuffer> rootscript)
{
rerun_pos = st->scriptp.pos;
st->state = ScriptEndState::ZERO;
- if (!st->freeloop && gotocount > 0 && (--gotocount) <= 0)
+ if (st->freeloop != 1 && gotocount > 0 && (--gotocount) <= 0)
{
PRINTF("run_script: infinity loop !\n"_fmt);
st->state = ScriptEndState::END;
@@ -806,7 +806,7 @@ void run_script_main(ScriptState *st, Borrowed<const ScriptBuffer> rootscript)
st->state = ScriptEndState::END;
break;
}
- if (!st->freeloop && cmdcount > 0 && (--cmdcount) <= 0)
+ if (st->freeloop != 1 && cmdcount > 0 && (--cmdcount) <= 0)
{
PRINTF("run_script: infinity loop !\n"_fmt);
st->state = ScriptEndState::END;