IPS patch correction

This commit is contained in:
dborth 2008-10-27 05:02:06 +00:00
parent 6864390b7f
commit 1d17d3f185

View File

@ -171,8 +171,12 @@ bool patchApplyIPS(MFILE * f, u8 **r, int *s) {
b = -1; b = -1;
// check if we need to reallocate our ROM // check if we need to reallocate our ROM
if ((offset + len) >= size) { if ((offset + len) >= size) {
#ifdef NGC
size = offset + len;
#else
size *= 2; size *= 2;
rom = (u8 *) realloc(rom, size); rom = (u8 *) realloc(rom, size);
#endif
*r = rom; *r = rom;
*s = size; *s = size;
} }