From d5be7ef0bb8d50c15da4905ea37907721f6daa86 Mon Sep 17 00:00:00 2001 From: rozlette Date: Sat, 28 May 2022 19:24:17 -0500 Subject: [PATCH] Fixes --- soh/soh/SaveManager.cpp | 8 ++++++++ .../overlays/gamestates/ovl_file_choose/z_file_choose.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/soh/soh/SaveManager.cpp b/soh/soh/SaveManager.cpp index e06533e0b..07ad23573 100644 --- a/soh/soh/SaveManager.cpp +++ b/soh/soh/SaveManager.cpp @@ -29,6 +29,14 @@ SaveManager::SaveManager() { for (SaveFileMetaInfo& info : fileMetaInfo) { info.valid = false; + info.deaths = 0; + for (int i = 0; i < ARRAY_COUNT(info.playerName); i++) { + info.playerName[i] = '\0'; + } + info.healthCapacity = 0; + info.questItems = 0; + info.defense = 0; + info.health = 0; } } diff --git a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c index 1fc467df5..9f04099d8 100644 --- a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c +++ b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c @@ -240,7 +240,7 @@ void FileChoose_UpdateMainMenu(GameState* thisx) { } if (this->buttonIndex == FS_BTN_MAIN_COPY) { - if (!Save_GetSaveMetaInfo(0)->valid && !Save_GetSaveMetaInfo(1)->valid && !Save_GetSaveMetaInfo(3)->valid) { + if (!Save_GetSaveMetaInfo(0)->valid && !Save_GetSaveMetaInfo(1)->valid && !Save_GetSaveMetaInfo(2)->valid) { this->warningButtonIndex = this->buttonIndex; this->warningLabel = FS_WARNING_NO_FILE_COPY; this->emptyFileTextAlpha = 255;