mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-12-29 03:24:36 +00:00
Fix ppu_patch invalid address check
This commit is contained in:
parent
8427af8886
commit
ec9622b513
@ -408,16 +408,12 @@ extern bool ppu_patch(u32 addr, u32 value)
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto ptr = vm::get_super_ptr<u32>(addr);
|
||||
|
||||
if (!ptr)
|
||||
if (!vm::try_access(addr, &value, sizeof(value), true))
|
||||
{
|
||||
LOG_FATAL(GENERAL, "Patch failed at 0x%x: invalid memory address.", addr);
|
||||
return false;
|
||||
}
|
||||
|
||||
*ptr = value;
|
||||
|
||||
const u32 _break = ::narrow<u32>(reinterpret_cast<std::uintptr_t>(&ppu_break));
|
||||
const u32 fallback = ::narrow<u32>(reinterpret_cast<std::uintptr_t>(&ppu_fallback));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user