From 0aef1bc6df48a302284fee37b8834d8aec09b379 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sun, 28 Jun 2015 02:00:33 -0700 Subject: [PATCH] Util: Allow loading IPS patches that grow the ROM --- CHANGES | 1 + src/util/patch-ips.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 69a9c09a1..bf49561b1 100644 --- a/CHANGES +++ b/CHANGES @@ -49,6 +49,7 @@ Bugfixes: - VFS: Fix line-reading to return proper values - GBA Memory: Fix load/store multiple video memory waitstates - GBA: Fix timing of reading from timer registers + - Util: Allow loading IPS patches that grow the ROM Misc: - Qt: Handle saving input settings better - Debugger: Free watchpoints in addition to breakpoints diff --git a/src/util/patch-ips.c b/src/util/patch-ips.c index 668f95795..6d6d53be9 100644 --- a/src/util/patch-ips.c +++ b/src/util/patch-ips.c @@ -39,7 +39,8 @@ bool loadPatchIPS(struct Patch* patch) { size_t _IPSOutputSize(struct Patch* patch, size_t inSize) { UNUSED(patch); - return inSize; + UNUSED(inSize); + return 16 * 1024 * 1024; // IPS patches can grow up to 16MiB, but not beyond } bool _IPSApplyPatch(struct Patch* patch, void* in, size_t inSize, void* out, size_t outSize) {