diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 928f1881bd..750659746f 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2007/11/22 + * Moved the reset of references to after the empty script checks in + parse_script. (fixes bugreport:222 and bugreport:449) * Renamed fakenpcname to setnpcdisplay, fixed and extended it. [FlavioJS] - See doc/script_commands.txt for information on how to use it * Modified mapserver login procedure to make clients from may 2007 diff --git a/src/map/script.c b/src/map/script.c index 14302250af..e5a7f832c3 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