mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-13 06:20:26 +02:00
Fix potential crash looking up block_num.
This commit is contained in:
1 parent
31f9d69e5a
commit
fcfcadaef2
3 files changed
+8
-3
No files matched your search
+6
-1
@@ -117,7 +117,12 @@ u32 Read_Instruction(u32 address)
|
||||
if (MIPS_IS_EMUHACK(inst) && MIPSComp::jit)
|
||||
{
|
||||
JitBlockCache *bc = MIPSComp::jit->GetBlockCache();
|
||||
return bc->GetOriginalFirstOp(bc->GetBlockNumberFromEmuHackOp(inst));
|
||||
int block_num = bc->GetBlockNumberFromEmuHackOp(inst);
|
||||
if (block_num >= 0) {
|
||||
return bc->GetOriginalFirstOp(block_num);
|
||||
} else {
|
||||
return inst;
|
||||
}
|
||||
} else {
|
||||
return inst;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user