From 67ce019b36735d2b5caffad2c47354c464e6d25d Mon Sep 17 00:00:00 2001 From: profi200 Date: Fri, 26 Jul 2024 21:22:40 +0200 Subject: [PATCH] Forgot to check the ROM size before adding the padding. --- source/arm11/open_agb_firm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/arm11/open_agb_firm.c b/source/arm11/open_agb_firm.c index ba08014..baeb943 100644 --- a/source/arm11/open_agb_firm.c +++ b/source/arm11/open_agb_firm.c @@ -69,7 +69,8 @@ static u32 fixRomPadding(const u32 romFileSize) } // Fake "open bus" padding. - makeOpenBusPaddingFast((u32*)(romLoc + mirroredSize)); + if(romSize < LGY_MAX_ROM_SIZE) + makeOpenBusPaddingFast((u32*)(romLoc + mirroredSize)); // We don't return the mirrored size because the db hashes are over unmirrored dumps. return romSize;