From 2898a10e8ec1df9afaa27ff1d0cb685fcb964720 Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 2 Aug 2006 15:40:25 +0000 Subject: - Fixed script code data not being free'd if a player quits in the middle of a script. - Modified run_script so that when there are leaks, it will report the place where run_script was called from as source rather than the inner code of run_script (for debugging purposes) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8057 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/script.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/map/script.h') diff --git a/src/map/script.h b/src/map/script.h index 8ce446212..f4bca3569 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -62,7 +62,9 @@ struct script_state { }; struct script_code* parse_script(unsigned char *,const char*,int); -void run_script(struct script_code*,int,int,int); +void run_script_sub(struct script_code *rootscript,int pos,int rid,int oid, char* file, int lineno); +//void run_script(struct script_code*,int,int,int); +#define run_script(sc,pos,rid,oid) run_script_sub(sc,pos,rid,oid,__FILE__,__LINE__) int set_var(struct map_session_data *sd, char *name, void *val); int conv_num(struct script_state *st,struct script_data *data); -- cgit v1.2.3-60-g2f50