소스 검색

Fixes a crash in the csv2yaml tool (#6141)

Kagetsu 3 년 전
부모
커밋
efd66000f6
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/tool/csv2yaml.cpp

+ 1 - 1
src/tool/csv2yaml.cpp

@@ -2957,7 +2957,7 @@ static bool itemdb_read_randomopt_group(char* str[], int columns, int current) {
 		if (group != nullptr)
 			entries = group->slots[j];
 
-		std::shared_ptr<s_random_opt_group_entry> entry;
+		std::shared_ptr<s_random_opt_group_entry> entry = std::make_shared<s_random_opt_group_entry>();
 
 		entry->id = static_cast<uint16>(randid_tmp);
 		entry->min_value = (int16)strtoul(str[k + 1], nullptr, 10);