1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 10:42:36 +01:00

Debugger/PPU: Minor bugfix in CR register dump

This commit is contained in:
Elad Ashkenazi 2024-08-14 16:42:21 +03:00
parent 456ff10f02
commit 46ceeed10d

View File

@ -1455,18 +1455,14 @@ void ppu_thread::dump_regs(std::string& ret, std::any& custom_data) const
continue; continue;
} }
if (usz index = dis_asm.last_opcode.rfind(",cr"); index < dis_asm.last_opcode.size() - 4) usz index = dis_asm.last_opcode.rfind(",cr");
{
const char result = dis_asm.last_opcode[index + 3];
if (result >= '0' && result <= '7') if (index > dis_asm.last_opcode.size() - 4)
{ {
func_data->preferred_cr_field_index = result - '0'; index = dis_asm.last_opcode.rfind(" cr");
break;
}
} }
if (usz index = dis_asm.last_opcode.rfind(" cr"); index < dis_asm.last_opcode.size() - 4) if (index <= dis_asm.last_opcode.size() - 4)
{ {
const char result = dis_asm.last_opcode[index + 3]; const char result = dis_asm.last_opcode[index + 3];