From 957ecdfbb008733cded26a6dab20c7ac13814f58 Mon Sep 17 00:00:00 2001 From: FlavioJS Date: Thu, 27 Dec 2007 05:47:50 +0000 Subject: * Corrected description of scope and npc variables in script_commands.txt. * Made temporary character string variables not have a limited length. (now all temporary string variables don't have limited length) * Made temporary character variables reuse free positions. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11984 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/script.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/map/script.c') diff --git a/src/map/script.c b/src/map/script.c index b0621aa40..12f9b9313 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -2268,11 +2268,8 @@ static int set_reg(struct script_state* st, TBL_PC* sd, int num, char* name, voi char* p; struct linkdb_node** n; n = (ref) ? ref : (name[1] == '@') ? st->stack->var_function : &st->script->script_vars; - p = linkdb_search(n, (void*)num); - if (p) { - linkdb_erase(n, (void*)num); - aFree(p); - } + p = linkdb_erase(n, (void*)num); + if (p) aFree(p); if (str[0]) linkdb_insert(n, (void*)num, aStrdup(str)); } return 1; -- cgit v1.2.3-70-g09d2