From bccfb1cda7c70d3f3b59b8e1765f9b56f8be9f23 Mon Sep 17 00:00:00 2001 From: Eladash Date: Wed, 26 Aug 2020 08:23:06 +0300 Subject: [PATCH] Fix empty input in Registers Editor --- rpcs3/rpcs3qt/register_editor_dialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpcs3/rpcs3qt/register_editor_dialog.cpp b/rpcs3/rpcs3qt/register_editor_dialog.cpp index f5fc3ee947..d4bf6adfa9 100644 --- a/rpcs3/rpcs3qt/register_editor_dialog.cpp +++ b/rpcs3/rpcs3qt/register_editor_dialog.cpp @@ -162,7 +162,7 @@ void register_editor_dialog::updateRegister(int reg) if (reg >= ppu_r0 && reg <= ppu_r31) str = fmt::format("%016llx", ppu.gpr[reg_index]); else if (reg >= ppu_ff0 && reg <= ppu_ff31) str = fmt::format("%g", ppu.fpr[reg_index]); - else if (reg >= ppu_ff0 && reg <= ppu_ff31) str = fmt::format("%016llx", std::bit_cast(ppu.fpr[reg_index])); + else if (reg >= ppu_f0 && reg <= ppu_f31) str = fmt::format("%016llx", std::bit_cast(ppu.fpr[reg_index])); else if (reg >= ppu_v0 && reg <= ppu_v31) str = fmt::format("%016llx%016llx", ppu.vr[reg_index]._u64[1], ppu.vr[reg_index]._u64[0]); } else if (reg == PPU_CR) str = fmt::format("%08x", ppu.cr.pack()); @@ -226,7 +226,7 @@ void register_editor_dialog::OnOkay(const std::shared_ptr& _cpu) value.clear(); } - if (!cpu) + if (!cpu || value.empty()) { } else if (cpu->id_type() == 1)