1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32: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;
}
if (usz index = dis_asm.last_opcode.rfind(",cr"); index < dis_asm.last_opcode.size() - 4)
{
const char result = dis_asm.last_opcode[index + 3];
usz index = dis_asm.last_opcode.rfind(",cr");
if (result >= '0' && result <= '7')
{
func_data->preferred_cr_field_index = result - '0';
break;
}
if (index > dis_asm.last_opcode.size() - 4)
{
index = dis_asm.last_opcode.rfind(" cr");
}
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];