diff options
author | ediejohnny <ediejohnny@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2013-02-08 23:39:22 +0000 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-04-11 15:33:33 -0300 |
commit | 39790db451bf767bea78e843a4663d9e2b05beaf (patch) | |
tree | 68cda2186b086ab330f81f343cc97916e6a64d88 /src/map | |
parent | c6c82fdf4120a08a860068f99bcc3ea5b338dd58 (diff) | |
download | hercules-39790db451bf767bea78e843a4663d9e2b05beaf.tar.gz hercules-39790db451bf767bea78e843a4663d9e2b05beaf.tar.bz2 hercules-39790db451bf767bea78e843a4663d9e2b05beaf.tar.xz hercules-39790db451bf767bea78e843a4663d9e2b05beaf.zip |
Fix at "callfunc" script command. bugreport:7246.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17125 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/script.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/map/script.c b/src/map/script.c index f55f9602a..4f98fff09 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -4783,7 +4783,7 @@ BUILDIN_FUNC(callfunc) st->state = END; return 1; } - + for( i = st->start+3, j = 0; i < st->end; i++, j++ ) { struct script_data* data = push_copy(st->stack,i); @@ -4791,10 +4791,8 @@ BUILDIN_FUNC(callfunc) { const char* name = reference_getname(data); if( name[0] == '.' ) { - if ( !ref ) { - ref = (struct DBMap**)aCalloc(sizeof(struct DBMap*), 1); - ref[0] = (name[1] == '@' ? st->stack->var_function : st->script->script_vars); - } + ref = (struct DBMap**)aCalloc(sizeof(struct DBMap*), 1); + ref[0] = (name[1] == '@' ? st->stack->var_function : st->script->script_vars); data->ref = ref; } } |