From 4bc95979de7a0451d2fd73ccd714880a520b525c Mon Sep 17 00:00:00 2001 From: Aurora Wright Date: Fri, 9 Jun 2017 13:42:24 +0200 Subject: [PATCH] Revert #949d219c726e41cca84c873e7e200be14af13f63 (breaks building on *nix) --- source/patches.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/patches.c b/source/patches.c index e641af7..b76de60 100644 --- a/source/patches.c +++ b/source/patches.c @@ -440,12 +440,13 @@ u32 patchSvcBreak9(u8 *pos, u32 size, u32 kernel9Address) u32 patchKernel9Panic(u8 *pos, u32 size) { - const u8 pattern[] = {0x00, 0x20, 0xA0, 0xE3, 0x02, 0x30, 0xA0, 0xE1, 0x02, 0x10, 0xA0, 0xE1, 0x05, 0x00, 0xA0, 0xE3}; + const u8 pattern[] = {0xFF, 0xEA, 0x04, 0xD0}; - u32 *off = (u32 *)memsearch(pos, pattern, size, sizeof(pattern)); + u8 *temp = memsearch(pos, pattern, size, sizeof(pattern)); - if(off == NULL) return 1; + if(temp == NULL) return 1; + u32 *off = (u32 *)(temp - 0x12); *off = 0xE12FFF7E; return 0;