diff options
author | shennetsind <ind@henn.et> | 2013-07-05 19:20:08 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-07-05 19:59:12 -0300 |
commit | dc85ce04b774af63fd9d13d9757feb91d56c1b81 (patch) | |
tree | a7d01a4352d615b7cdc128ad030963b4db180f30 /src/map/script.c | |
parent | 0118a097c9626b3f8342dd29897392f3da4c1187 (diff) | |
parent | 3fd6437cc84cbb87f27bd43f990d468623a2a49e (diff) | |
download | hercules-dc85ce04b774af63fd9d13d9757feb91d56c1b81.tar.gz hercules-dc85ce04b774af63fd9d13d9757feb91d56c1b81.tar.bz2 hercules-dc85ce04b774af63fd9d13d9757feb91d56c1b81.tar.xz hercules-dc85ce04b774af63fd9d13d9757feb91d56c1b81.zip |
HCache | Item Packages Update
http://hercules.ws/board/topic/1389-hcache-item-packages-update/
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c index 3ba8ea9fc..19e6457bd 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -4344,8 +4344,10 @@ BUILDIN(callfunc) { const char* name = reference_getname(data); if( name[0] == '.' ) { - ref = (struct DBMap**)aCalloc(sizeof(struct DBMap*), 1); - ref[0] = (name[1] == '@' ? st->stack->var_function : st->script->script_vars); + if( !ref ) { + ref = (struct DBMap**)aCalloc(sizeof(struct DBMap*), 1); + ref[0] = (name[1] == '@' ? st->stack->var_function : st->script->script_vars); + } data->ref = ref; } } |