summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-28 18:26:55 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-28 18:26:55 +0000
commit3e7fd80993f7fccdcd1d4ac70be74a28485876de (patch)
treeb3f99fa1c679e12cc31a54637bead17228349e79 /src/map/itemdb.c
parentd32a1dd3390e960ca90db57f7b15f5f8d1470415 (diff)
downloadhercules-3e7fd80993f7fccdcd1d4ac70be74a28485876de.tar.gz
hercules-3e7fd80993f7fccdcd1d4ac70be74a28485876de.tar.bz2
hercules-3e7fd80993f7fccdcd1d4ac70be74a28485876de.tar.xz
hercules-3e7fd80993f7fccdcd1d4ac70be74a28485876de.zip
* Changed back the query to get the friends of a character to a LEFT JOIN.
* Setting the item script variables to NULL when they are freed. (bugreport:142 ?) (a double @reloaditemdb might result in a double free) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11328 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r--src/map/itemdb.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index f6cdf6b3f..91eaeafce 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -769,11 +769,20 @@ static bool itemdb_parse_dbrow(char** str, char* source, int line)
id->sex = itemdb_gendercheck(id); //Apply gender filtering.
if (id->script)
+ {
script_free_code(id->script);
+ id->script = NULL;
+ }
if (id->equip_script)
+ {
script_free_code(id->equip_script);
+ id->equip_script = NULL;
+ }
if (id->unequip_script)
+ {
script_free_code(id->unequip_script);
+ id->unequip_script = NULL;
+ }
if (*str[19])
id->script = parse_script(str[19], source, line, 0);