summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-06-14 09:17:54 -0300
committershennetsind <ind@henn.et>2013-06-14 09:17:54 -0300
commit76f096c1af7089c59a8cfd763658531d839dea9b (patch)
tree19e5dea2cb10a17b591439bb706b433abf890d64
parent0f7879b1d2c9cd6ddbedcc7f359e4f981690ef46 (diff)
downloadhercules-76f096c1af7089c59a8cfd763658531d839dea9b.tar.gz
hercules-76f096c1af7089c59a8cfd763658531d839dea9b.tar.bz2
hercules-76f096c1af7089c59a8cfd763658531d839dea9b.tar.xz
hercules-76f096c1af7089c59a8cfd763658531d839dea9b.zip
Fixed Bug #7365
Special Thanks to Axiom http://hercules.ws/board/tracker/issue-7365-scriptc-error/ Also fixed packetKeys order for 2013-06-12 Signed-off-by: shennetsind <ind@henn.et>
-rw-r--r--src/map/packets.h2
-rw-r--r--src/map/script.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/map/packets.h b/src/map/packets.h
index d0910f183..756e053d1 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -2246,7 +2246,7 @@ packet(0x020d,-1);
#endif
#if PACKETVER >= 20130612
- packetKeys(0x295B0FCB, 0x3C000FCF, 0x6D166F66); /* Thanks to Shakto */
+ packetKeys(0x6D166F66, 0x3C000FCF, 0x295B0FCB); /* Thanks to Shakto */
#endif
#endif /* _PACKETS_H_ */
diff --git a/src/map/script.c b/src/map/script.c
index 60f741d6c..f3bf2470a 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -2786,7 +2786,7 @@ void script_free_state(struct script_state* st)
script->pop_stack(st, 0, st->stack->sp);
aFree(st->stack->stack_data);
aFree(st->stack);
- if( st->script->script_vars && !db_size(st->script->script_vars) ) {
+ if( st->script && st->script->script_vars && !db_size(st->script->script_vars) ) {
script_free_vars(st->script->script_vars);
st->script->script_vars = NULL;
}