mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-01 03:32:07 +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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto ptr = vm::get_super_ptr<u32>(addr);
|
if (!vm::try_access(addr, &value, sizeof(value), true))
|
||||||
|
|
||||||
if (!ptr)
|
|
||||||
{
|
{
|
||||||
LOG_FATAL(GENERAL, "Patch failed at 0x%x: invalid memory address.", addr);
|
LOG_FATAL(GENERAL, "Patch failed at 0x%x: invalid memory address.", addr);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
*ptr = value;
|
|
||||||
|
|
||||||
const u32 _break = ::narrow<u32>(reinterpret_cast<std::uintptr_t>(&ppu_break));
|
const u32 _break = ::narrow<u32>(reinterpret_cast<std::uintptr_t>(&ppu_break));
|
||||||
const u32 fallback = ::narrow<u32>(reinterpret_cast<std::uintptr_t>(&ppu_fallback));
|
const u32 fallback = ::narrow<u32>(reinterpret_cast<std::uintptr_t>(&ppu_fallback));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user