From 22531fed27bbacbc3d0ec2c05fbe53b1a90e8dea Mon Sep 17 00:00:00 2001 From: Malkierian Date: Sat, 13 May 2023 11:47:22 -0700 Subject: [PATCH] A little more code clarification. --- soh/soh/SaveManager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/soh/soh/SaveManager.cpp b/soh/soh/SaveManager.cpp index f9e488b05..ab82bd0d2 100644 --- a/soh/soh/SaveManager.cpp +++ b/soh/soh/SaveManager.cpp @@ -723,6 +723,8 @@ void SaveManager::SaveFileThreaded(int fileNum, SaveContext* saveContext, const if (std::find(gameSaveRegistry.begin(), gameSaveRegistry.end(), sectionHandler.first) != gameSaveRegistry.end()) { nlohmann::json& sectionBlock = saveBlock["sections"][sectionHandler.first]; sectionBlock["version"] = sectionHandler.second.first; + // If any save file is loaded for medatata, or a spoiler log is loaded (not sure which at this point), there is still data in the "randomizer" section + // This clears the randomizer data block if and only if the section being called is "randomizer" and n64ddFlag is false. if (sectionHandler.first == "randomizer" && !gSaveContext.n64ddFlag) { sectionBlock["data"] = nlohmann::json::object(); }