summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-03-08 09:47:49 -0500
committergumi <git@gumi.ca>2018-03-08 09:47:49 -0500
commit535dece441bceeaf013457ea0e3cc048fc78017c (patch)
treed75d43b8b0a9e93778b5435128e4daf54f7ff007 /src/map
parentbf4a33325fa09040e71bce0a757d94b1cce49e9b (diff)
downloadtmwa-535dece441bceeaf013457ea0e3cc048fc78017c.tar.gz
tmwa-535dece441bceeaf013457ea0e3cc048fc78017c.tar.bz2
tmwa-535dece441bceeaf013457ea0e3cc048fc78017c.tar.xz
tmwa-535dece441bceeaf013457ea0e3cc048fc78017c.zip
fix ScriptState uninitialized values
Diffstat (limited to 'src/map')
-rw-r--r--src/map/script-call.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map/script-call.cpp b/src/map/script-call.cpp
index 289cb68..5541043 100644
--- a/src/map/script-call.cpp
+++ b/src/map/script-call.cpp
@@ -822,6 +822,7 @@ void run_script_main(ScriptState *st, Borrowed<const ScriptBuffer> rootscript)
dumb_ptr<npc_data> nd = map_id_is_npc(st->oid);
PRINTF("run_script: infinity loop! @ %s\n"_fmt,
nd ? nd->name : NpcName());
+ st->state = ScriptEndState::END;
}
}
break;
@@ -884,6 +885,7 @@ void run_script_main(ScriptState *st, Borrowed<const ScriptBuffer> rootscript)
dumb_ptr<npc_data> nd = map_id_is_npc(st->oid);
PRINTF("run_script: infinity loop! @ %s\n"_fmt,
nd ? nd->name : NpcName());
+ st->state = ScriptEndState::END;
}
}
dumb_ptr<map_session_data> sd = map_id2sd(st->rid);
@@ -974,6 +976,8 @@ int run_script_l(ScriptPointer sp, BlockId rid, BlockId oid,
st.scriptp = sp;
st.rid = rid;
st.oid = oid;
+ st.freeloop = 0;
+ st.is_true = 0;
for (i = 0; i < args.size(); i++)
{