summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-12-12 18:51:03 -0200
committershennetsind <ind@henn.et>2013-12-12 18:51:03 -0200
commitc9d40ca1cea0765ac5077885ccfaaa05db27dc02 (patch)
treea188aa96007f7da321a99f2750459c2506cd987c /src
parentf19fb901515040486b93cca47bd9aa287f841195 (diff)
downloadhercules-c9d40ca1cea0765ac5077885ccfaaa05db27dc02.tar.gz
hercules-c9d40ca1cea0765ac5077885ccfaaa05db27dc02.tar.bz2
hercules-c9d40ca1cea0765ac5077885ccfaaa05db27dc02.tar.xz
hercules-c9d40ca1cea0765ac5077885ccfaaa05db27dc02.zip
ensuring script_state is clear (as ers reuses memory).
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src')
-rw-r--r--src/map/script.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 0166ca471..b1c4d8d6b 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -2940,6 +2940,7 @@ struct script_state* script_alloc_state(struct script_code* rootscript, int pos,
struct script_state* st;
st = ers_alloc(script->st_ers, struct script_state);
+ memset(st, 0, sizeof(struct script_state));
st->stack = ers_alloc(script->stack_ers, struct script_stack);
st->stack->sp = 0;
st->stack->sp_max = 64;