From 7929930775b05bd5fbb21be659f32050dc7216bd Mon Sep 17 00:00:00 2001 From: FlavioJS Date: Thu, 22 Nov 2007 19:00:39 +0000 Subject: * Moved the reset of references to after the empty script checks in parse_script. (fixes bugreport:222 and bugreport:449) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11782 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/script.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/map/script.c b/src/map/script.c index 14302250a..e5a7f832c 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -1876,8 +1876,8 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o if(first){ add_buildin_func(); read_constdb(); + first=0; } - first=0; script_buf=(unsigned char *)aMalloc(SCRIPT_BLOCK_SIZE*sizeof(unsigned char)); script_pos=0; @@ -1885,16 +1885,6 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o str_data[LABEL_NEXTLINE].type=C_NOP; str_data[LABEL_NEXTLINE].backpatch=-1; str_data[LABEL_NEXTLINE].label=-1; - for(i=LABEL_START;i