- Change strncpy to memcpy when parsing switches in the script engine since it's guaranteed to be a word of that size (skip_word).

- Made scriptlabel_db duplicate the key. When str_buf is reallocated, the keys in scriptlabel_db could become invalid, causing a crash in npc_convertlabel_db.
( removed the readded >=0x81 equivalent )
- Now npc_convertlabel_db clears scriptlabel_db after using it.
- parse_script has an extra parameter options. At the moment it only indicates if scriptlabel_db should be used or not.
- Fixed "UINT_MAX undeclared" on systems that don't declare it in limits.h

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9557 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
FlavioJS
2006-12-22 05:27:03 +00:00
parent 01f8edfa6e
commit e75a8eca56
9 changed files with 83 additions and 61 deletions

View File

@@ -61,7 +61,11 @@ struct script_state {
} sleep;
};
struct script_code* parse_script(const char* src,const char* file,int line);
enum script_parse_options {
SCRIPT_USE_LABEL_DB = 0x1
};
struct script_code* parse_script(const char* src,const char* file,int line,int options);
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);