PatchEngine: check instruction at link addr is non-zero

Regression introduced in #4738. Fixes
https://bugs.dolphin-emu.org/issues/10110.
This commit is contained in:
Michael Maltese 2017-02-22 20:12:19 -08:00
parent 9b0ce31906
commit da35abbbe2
1 changed files with 2 additions and 1 deletions

View File

@ -223,7 +223,8 @@ static bool IsStackSane()
return false;
// Check the link register makes sense (that it points to a valid IBAT address)
return PowerPC::HostIsInstructionRAMAddress(PowerPC::HostRead_U32(next_SP + 4));
const u32 address = PowerPC::HostRead_U32(next_SP + 4);
return PowerPC::HostIsInstructionRAMAddress(address) && 0 != PowerPC::HostRead_U32(address);
}
bool ApplyFramePatches()