From 746615a93709694e542901dcab8388f48d052d0b Mon Sep 17 00:00:00 2001 From: Malcolm Jestadt Date: Sat, 13 Jun 2020 16:31:11 -0400 Subject: [PATCH] Fix embedded spu elf patching --- Utilities/bin_patch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Utilities/bin_patch.cpp b/Utilities/bin_patch.cpp index 9648840adc..e939498ec0 100644 --- a/Utilities/bin_patch.cpp +++ b/Utilities/bin_patch.cpp @@ -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;