summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index fa2fa1ead..7933f6d43 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -3337,11 +3337,10 @@ const char* npc_parse_function(char* w1, char* w2, char* w3, char* w4, const cha
return end;
func_db = script->userfunc_db;
- if (func_db->put(func_db, DB->str2key(w3), DB->ptr2data(scriptroot), &old_data))
- {
+ if (func_db->put(func_db, DB->str2key(w3), DB->ptr2data(scriptroot), &old_data)) {
struct script_code *oldscript = (struct script_code*)DB->data2ptr(&old_data);
ShowWarning("npc_parse_function: Overwriting user function [%s] in file '%s', line '%d'.\n", w3, filepath, strline(buffer,start-buffer));
- script->free_vars(oldscript->script_vars);
+ script->free_vars(oldscript->local.vars);
aFree(oldscript->script_buf);
aFree(oldscript);
}