summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-12-27 05:47:50 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-12-27 05:47:50 +0000
commit957ecdfbb008733cded26a6dab20c7ac13814f58 (patch)
tree4d639c3e82d23437b54f14ca56bbfcf1bb5d6ffc /src/map/script.c
parent1307b441cd2cdc94bdde1999d48aefb55d91e082 (diff)
downloadhercules-957ecdfbb008733cded26a6dab20c7ac13814f58.tar.gz
hercules-957ecdfbb008733cded26a6dab20c7ac13814f58.tar.bz2
hercules-957ecdfbb008733cded26a6dab20c7ac13814f58.tar.xz
hercules-957ecdfbb008733cded26a6dab20c7ac13814f58.zip
* 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
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c7
1 files changed, 2 insertions, 5 deletions
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;