Add check for blank buildVersion in sohStats block for determining old saves.

This commit is contained in:
Malkierian 2025-07-23 13:44:55 -07:00
commit 329d654ec0

View file

@ -1122,7 +1122,8 @@ void SaveManager::LoadFile(int fileNum) {
case 1: case 1:
for (auto& block : saveBlock["sections"].items()) { for (auto& block : saveBlock["sections"].items()) {
bool oldVanilla = block.value()["data"].empty() || block.value()["data"].contains("aat0") || bool oldVanilla = block.value()["data"].empty() || block.value()["data"].contains("aat0") ||
block.value()["data"]["entrances"].empty(); block.value()["data"]["entrances"].empty() ||
SohUtils::IsStringEmpty(saveBlock["sections"]["sohStats"]["data"]["buildVersion"]);
std::string sectionName = block.key(); std::string sectionName = block.key();
if (sectionName == "randomizer") { if (sectionName == "randomizer") {
bool hasStats = saveBlock["sections"].contains("sohStats"); bool hasStats = saveBlock["sections"].contains("sohStats");