mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 09:09:52 -06:00
PatchEngine/GeckoCode: Heuristic stack checks
Try to make sure the stack is sane before calling into the codehandler. This is intended to reduce the possibility of random memory corruption.
This commit is contained in:
@ -483,9 +483,8 @@ bool CBoot::BootUp()
|
||||
// Not part of the binary itself, but either we or Gecko OS might insert
|
||||
// this, and it doesn't clear the icache properly.
|
||||
HLE::Patch(Gecko::ENTRY_POINT, "GeckoCodehandler");
|
||||
if (SConfig::GetInstance().bEnableCheats)
|
||||
{
|
||||
HLE::Patch(Gecko::HLE_TRAMPOLINE_ADDRESS, "GeckoHandlerReturnTrampoline");
|
||||
}
|
||||
// This has to always be installed even if cheats are not enabled because of the possiblity of
|
||||
// loading a savestate where PC is inside the code handler while cheats are disabled.
|
||||
HLE::Patch(Gecko::HLE_TRAMPOLINE_ADDRESS, "GeckoHandlerReturnTrampoline");
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user