diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-10-03 16:19:14 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-10-03 16:19:14 +0000 |
commit | c2006cba2be4ba0588186a2f5f61cc7f73392b2b (patch) | |
tree | 56f567a48227df97e9171cb48d9f22af806fcfeb /src/map/script.c | |
parent | 6094568a44e60c0ac6021cb9b44973e325dcae6e (diff) | |
download | hercules-c2006cba2be4ba0588186a2f5f61cc7f73392b2b.tar.gz hercules-c2006cba2be4ba0588186a2f5f61cc7f73392b2b.tar.bz2 hercules-c2006cba2be4ba0588186a2f5f61cc7f73392b2b.tar.xz hercules-c2006cba2be4ba0588186a2f5f61cc7f73392b2b.zip |
- Reverted declaration of run_script to normal since it appears there's no longer any memory leaks related to it.
- Returned the MAX_PC_BONUS value to 10.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8928 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/map/script.c b/src/map/script.c index 09fb80b32..58c72d3bf 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -2511,9 +2511,7 @@ int run_func(struct script_state *st) */ void run_script_main(struct script_state *st); -//FIXME: Temporary replacement to locate the leak source. -//void run_script(struct script_code *rootscript,int pos,int rid,int oid) -void run_script_sub(struct script_code *rootscript,int pos,int rid,int oid, char* file, int lineno) +void run_script(struct script_code *rootscript,int pos,int rid,int oid) { struct script_state *st; struct map_session_data *sd=NULL; @@ -2526,18 +2524,14 @@ void run_script_sub(struct script_code *rootscript,int pos,int rid,int oid, char //Resume script. st = sd->st; } else { -// st = aCalloc(sizeof(struct script_state), 1); - st = _mcalloc(sizeof(struct script_state), 1, file, lineno, __func__); + st = aCalloc(sizeof(struct script_state), 1); // the script is different, make new script_state and stack -// st->stack = aMalloc (sizeof(struct script_stack)); - st->stack = _mmalloc(sizeof(struct script_stack), file, lineno, __func__); + st->stack = aMalloc (sizeof(struct script_stack)); st->stack->sp=0; st->stack->sp_max=64; -// st->stack->stack_data = (struct script_data *)aCalloc(st->stack->sp_max,sizeof(st->stack->stack_data[0])); - st->stack->stack_data = (struct script_data *)_mcalloc(st->stack->sp_max,sizeof(st->stack->stack_data[0]), file, lineno, __func__); + st->stack->stack_data = (struct script_data *)aCalloc(st->stack->sp_max,sizeof(st->stack->stack_data[0])); st->stack->defsp = st->stack->sp; -// st->stack->var_function = aCalloc(1, sizeof(struct linkdb_node*)); - st->stack->var_function = _mcalloc(1, sizeof(struct linkdb_node*), file, lineno, __func__); + st->stack->var_function = aCalloc(1, sizeof(struct linkdb_node*)); st->state = RUN; st->script = rootscript; } |