summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-07-21 11:33:43 -0300
committershennetsind <ind@henn.et>2013-07-21 11:33:43 -0300
commita76709480b8300c7af955f5c2c85d2039c1ee919 (patch)
tree961b8a411f43bb6ea8c5cbf0e5cd2509e1a6797e
parente26c9504e825abe8fe50eca28bf3b89de8e4bd9c (diff)
downloadhercules-a76709480b8300c7af955f5c2c85d2039c1ee919.tar.gz
hercules-a76709480b8300c7af955f5c2c85d2039c1ee919.tar.bz2
hercules-a76709480b8300c7af955f5c2c85d2039c1ee919.tar.xz
hercules-a76709480b8300c7af955f5c2c85d2039c1ee919.zip
Fixed Bug #7547
str_data[].val was uninitialised and thus using garbage memory on compilers that don't automatically initialize http://hercules.ws/board/tracker/issue-7547-notice-conflicting-itemscript-var/ Also updated guild aura sc_config options (special thanks to kyeme!) Signed-off-by: shennetsind <ind@henn.et>
-rw-r--r--db/sc_config.txt8
-rw-r--r--src/map/script.c1
2 files changed, 5 insertions, 4 deletions
diff --git a/db/sc_config.txt b/db/sc_config.txt
index 4143b8b2e..b1cc016b9 100644
--- a/db/sc_config.txt
+++ b/db/sc_config.txt
@@ -384,10 +384,10 @@ SC_REBOUND, 18
SC_TELEKINESIS_INTENSE,18
//Guild Auras should not be saved
-SC_LEADERSHIP,2
-SC_GLORYWOUNDS,2
-SC_SOULCOLD,2
-SC_HAWKEYES,2
+SC_LEADERSHIP,78
+SC_GLORYWOUNDS,78
+SC_SOULCOLD,78
+SC_HAWKEYES,78
// Unremovable
SC_WEIGHTOVER50, 79
diff --git a/src/map/script.c b/src/map/script.c
index 02fbf00ed..27368a174 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -569,6 +569,7 @@ int add_str(const char* p)
safestrncpy(script->str_buf+script->str_pos, p, len+1);
script->str_data[script->str_num].type = C_NOP;
script->str_data[script->str_num].str = script->str_pos;
+ script->str_data[script->str_num].val = 0;
script->str_data[script->str_num].next = 0;
script->str_data[script->str_num].func = NULL;
script->str_data[script->str_num].backpatch = -1;