Common/GekkoDisassembler: Amend disassembly of operations expecting a character literal

Due to the lack of cast here, this will actually print out the ascii
value, rather than the character itself, due to promoting to integral
values. Instead, we can eliminate the use of character operands and just
print the value itself directly, given it's equivalent behavior with
less code.
This commit is contained in:
Lioncash 2019-06-16 19:25:25 -04:00
parent 0cde8ab9e8
commit d8c3f09c9f
1 changed files with 3 additions and 3 deletions

View File

@ -504,7 +504,7 @@ void GekkoDisassembler::cmpi(u32 in, int uimm)
i = (int)PPCGETCRD(in);
if (i != 0)
{
m_operands += fmt::format("cr{}, ", '0' + i);
m_operands += fmt::format("cr{}, ", i);
}
m_operands += imm(in, uimm, 2, false);
@ -716,7 +716,7 @@ void GekkoDisassembler::cmp(u32 in)
i = (int)PPCGETCRD(in);
if (i != 0)
m_operands += fmt::format("cr{},", static_cast<char>('0' + i));
m_operands += fmt::format("cr{},", i);
m_operands += ra_rb(in);
}
@ -1220,7 +1220,7 @@ void GekkoDisassembler::ps(u32 inst)
int i = (int)PPCGETCRD(inst);
if (i != 0)
m_operands += fmt::format("cr{}, ", '0' + i);
m_operands += fmt::format("cr{}, ", i);
m_operands += fmt::format("p{}, p{}", FA, FB);
return;
}