From 1d17d3f185a587e3c46470f7811053352d8f19b6 Mon Sep 17 00:00:00 2001 From: dborth Date: Mon, 27 Oct 2008 05:02:06 +0000 Subject: [PATCH] IPS patch correction --- source/vba/Patch.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/vba/Patch.cpp b/source/vba/Patch.cpp index a8dd215..44081f3 100644 --- a/source/vba/Patch.cpp +++ b/source/vba/Patch.cpp @@ -171,8 +171,12 @@ bool patchApplyIPS(MFILE * f, u8 **r, int *s) { b = -1; // check if we need to reallocate our ROM if ((offset + len) >= size) { +#ifdef NGC + size = offset + len; +#else size *= 2; rom = (u8 *) realloc(rom, size); +#endif *r = rom; *s = size; }