From dd3709ad486bc8e3d9755c5c610de08ae0291042 Mon Sep 17 00:00:00 2001 From: Maschell Date: Thu, 23 Sep 2021 23:03:48 +0200 Subject: [PATCH] Fix PA fallback calcuation --- source/function_patcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/function_patcher.cpp b/source/function_patcher.cpp index 343fd93..2443d91 100644 --- a/source/function_patcher.cpp +++ b/source/function_patcher.cpp @@ -245,7 +245,7 @@ void FunctionPatcherRestoreFunctions(function_replacement_data_t *replacements, uint32_t sourceAddrPhys = (uint32_t) OSEffectiveToPhysical(sourceAddr); // These hardcoded values should be replaced with something more dynamic. - if (sourceAddrPhys == 0 && (sourceAddr >= 0x00800000 || sourceAddr < 0x01000000)) { + if (sourceAddrPhys == 0 && (sourceAddr >= 0x00800000 && sourceAddr < 0x01000000)) { sourceAddrPhys = sourceAddr + 0x30800000 - 0x00800000; }