diff --git a/mm/2s2h/DeveloperTools/SaveEditor.cpp b/mm/2s2h/DeveloperTools/SaveEditor.cpp index 720098379..25cf9d895 100644 --- a/mm/2s2h/DeveloperTools/SaveEditor.cpp +++ b/mm/2s2h/DeveloperTools/SaveEditor.cpp @@ -28,7 +28,7 @@ const char* MAGIC_LEVEL_NAMES[3] = { "No Magic", "Single Magic", "Double Magic" const int8_t MAGIC_LEVEL_MAX = 2; InventorySlot selectedInventorySlot = SLOT_NONE; -std::vector safeItemsForInventorySlot[SLOT_MASK_FIERCE_DEITY] = {}; +std::vector safeItemsForInventorySlot[SLOT_MASK_FIERCE_DEITY + 1] = {}; void initSafeItemsForInventorySlot() { for (int i = 0; i < sizeof(gItemSlots); i++) { @@ -127,7 +127,7 @@ void DrawGeneralTab() { ImGui::PushStyleColor(ImGuiCol_FrameBg, UIWidgets::Colors::Gray); ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 3.0f); ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(10.0f, 8.0f)); - char playerNameBuf[9]; + static char playerNameBuf[9]; ImGui::InputText("##playerNameInput", getPlayerName(playerNameBuf), 9, ImGuiInputTextFlags_CallbackAlways | ImGuiInputTextFlags_AutoSelectAll, setPlayerName); ImGui::PopStyleVar(2); ImGui::PopStyleColor(1);