From 8e1f5b4654a6982ffc33d669689c55ae2209565c Mon Sep 17 00:00:00 2001 From: wiidev Date: Sat, 7 Jan 2023 23:30:02 +0000 Subject: [PATCH] Fix and improve some patches --- source/patches/gamepatches.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/patches/gamepatches.c b/source/patches/gamepatches.c index 6d949e6c..22bb4fcf 100644 --- a/source/patches/gamepatches.c +++ b/source/patches/gamepatches.c @@ -199,8 +199,8 @@ void patch_width(u8 *addr, u32 len) void *offset = addr_start - 0x70; u32 old_heap_ptr = *(u32 *)0x80003110; - *(u32 *)0x80003110 = old_heap_ptr - 0x20; - u32 heap_space = old_heap_ptr - 0x20; + *(u32 *)0x80003110 = old_heap_ptr - 0x40; + u32 heap_space = old_heap_ptr - 0x40; u32 org_address = (addr_start[-0x70] << 24) | (addr_start[-0x6F] << 16); *(u32 *)(heap_space + 0x00) = org_address | 4; @@ -2029,7 +2029,7 @@ void patch_vfilters_rogue(u8 *addr, u32 len, u8 *vfilter) { gprintf("Replaced vfilter %02x%02x%02x%02x%02x%02x%02x @ %p\n", addr_start[0], addr_start[1], addr_start[2], addr_start[3], addr_start[4], addr_start[5], addr_start[6], addr_start); - memcpy(addr, vfilter, 7); + memcpy(addr_start, vfilter, 7); addr_start += 7; break; }