瀏覽代碼

Fixed compile error on VS2010
* unprofessional personal diary page 1

Jittapan Pluemsumran 8 年之前
父節點
當前提交
1e8c27c085
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/map/itemdb.c

+ 3 - 2
src/map/itemdb.c

@@ -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));