summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-09 02:45:01 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-09 02:45:01 +0000
commit1452a06a0c7df3f152bc2373ea1ee7378852dadb (patch)
treeb17c33fe1648cbaafb7c764aef71aad605998b64 /src/map/npc.c
parent4e6b84f5321154587932e5758f63280bde34b02e (diff)
downloadhercules-1452a06a0c7df3f152bc2373ea1ee7378852dadb.tar.gz
hercules-1452a06a0c7df3f152bc2373ea1ee7378852dadb.tar.bz2
hercules-1452a06a0c7df3f152bc2373ea1ee7378852dadb.tar.xz
hercules-1452a06a0c7df3f152bc2373ea1ee7378852dadb.zip
* Hotfix: Freeing of freed pointer when replacing script functions. [Lance]
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9634 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 802bc3b4a..4b1fa5c10 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2178,7 +2178,8 @@ static int npc_parse_function (char *w1, char *w2, char *w3, char *w4, char *fir
if(oldscript != NULL) {
printf("\r"); //Carriage return to clear the 'loading..' line. [Skotlex]
ShowInfo("parse_function: Overwriting user function [%s] (%s:%d)\n", p, file, *lines);
- script_free_code(oldscript);
+ script_free_vars( &oldscript->script_vars );
+ aFree( oldscript->script_buf );
user_db->remove(user_db,str2key(p));
strdb_put(user_db, p, script);
} else