mirror of
https://github.com/hedge-dev/XenonRecomp.git
synced 2025-06-06 01:02:08 +00:00
Add label count by 1
This commit is contained in:
parent
6057ffe167
commit
594a339a77
@ -117,7 +117,7 @@ void ScanTable(const uint32_t* code, size_t base, SwitchTable& table)
|
|||||||
cr = insn.operands[0];
|
cr = insn.operands[0];
|
||||||
if (insn.opcode->operands[1] != 0)
|
if (insn.opcode->operands[1] != 0)
|
||||||
{
|
{
|
||||||
table.defaultLabel = insn.operands[1] + 1;
|
table.defaultLabel = insn.operands[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (cr != -1)
|
else if (cr != -1)
|
||||||
@ -125,7 +125,7 @@ void ScanTable(const uint32_t* code, size_t base, SwitchTable& table)
|
|||||||
if (insn.opcode->id == PPC_INST_CMPLWI && insn.operands[0] == cr)
|
if (insn.opcode->id == PPC_INST_CMPLWI && insn.operands[0] == cr)
|
||||||
{
|
{
|
||||||
table.r = insn.operands[1];
|
table.r = insn.operands[1];
|
||||||
table.labels.resize(insn.operands[2]);
|
table.labels.resize(insn.operands[2] + 1);
|
||||||
table.base = base;
|
table.base = base;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user