Fixed compile error on VS2010

* unprofessional personal diary page 1
This commit is contained in:
Jittapan Pluemsumran 2016-08-14 23:23:11 +07:00
parent 8657c4210c
commit 1e8c27c085
No known key found for this signature in database
GPG Key ID: CE430096446F41D9

View File

@ -1609,6 +1609,9 @@ static bool itemdb_read_randomopt(const char* basedir, bool silent) {
}
else {
int id;
struct s_random_opt_data *data;
struct script_code *code;
str[0] = trim(str[0]);
if (ISDIGIT(str[0][0])) {
id = atoi(str[0]);
@ -1616,8 +1619,6 @@ static bool itemdb_read_randomopt(const char* basedir, bool silent) {
else {
script_get_constant(str[0], &id);
}
struct s_random_opt_data *data;
struct script_code *code;
if ((data = itemdb_randomopt_exists(id)) == NULL) {
data = malloc(sizeof(struct s_random_opt_data));