Skip to content

Commit

Permalink
update save version check
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz-h committed Sep 19, 2022
1 parent 3ce0541 commit ddbaf7c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/GameTypes/Save/SaveHeader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ void Satisfactory3DMap::SaveHeader::serialize(Satisfactory3DMap::Archive& ar) {
throw std::runtime_error("Unknown Save-Header Version: " + std::to_string(save_header_version_));
}
ar << save_version_;
if (save_version_ != 29) {
throw std::runtime_error("Unknown Save Version: " + std::to_string(save_version_));
if (save_version_ < 29) {
throw std::runtime_error(
"Save version must be at least 29 (Update 6). Found old version: " + std::to_string(save_version_));
}
ar << build_version_;
ar << map_name_;
Expand Down

0 comments on commit ddbaf7c

Please sign in to comment.