mirror of
https://github.com/hedge-dev/XenonRecomp.git
synced 2025-06-06 18:31:03 +00:00
Handle invalid instructions as end block
This commit is contained in:
parent
5cef220e9f
commit
87a74e2001
@ -120,7 +120,7 @@ Function Function::Analyze(const void* code, size_t size, size_t base)
|
|||||||
|
|
||||||
RESTORE_DATA();
|
RESTORE_DATA();
|
||||||
}
|
}
|
||||||
else if (op == PPC_OP_B || instruction == 0 || insn.opcode->id == PPC_INST_BLR) // b, blr, end padding
|
else if (op == PPC_OP_B || instruction == 0 || (insn.opcode != nullptr && insn.opcode->id == PPC_INST_BLR)) // b, blr, end padding
|
||||||
{
|
{
|
||||||
if (!isLink)
|
if (!isLink)
|
||||||
{
|
{
|
||||||
@ -173,6 +173,11 @@ Function Function::Analyze(const void* code, size_t size, size_t base)
|
|||||||
RESTORE_DATA();
|
RESTORE_DATA();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (insn.opcode == nullptr)
|
||||||
|
{
|
||||||
|
blockStack.pop_back();
|
||||||
|
RESTORE_DATA();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sort and invalidate discontinuous blocks
|
// Sort and invalidate discontinuous blocks
|
||||||
|
Loading…
x
Reference in New Issue
Block a user