Fix embedded spu elf patching

This commit is contained in:
Malcolm Jestadt 2020-06-13 16:31:11 -04:00 committed by Megamouse
parent e485c9c79c
commit 746615a937

View File

@ -394,13 +394,13 @@ std::size_t patch_engine::apply_patch(const std::string& name, u8* dst, u32 file
if constexpr (check_local_storage)
{
offset -= ls_addr;
if (offset < ls_addr || offset >= (ls_addr + filesz))
{
// This patch is out of range for this segment
continue;
}
offset -= ls_addr;
}
auto ptr = dst + offset;