- 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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user