From f40a1cc47bf4b7125d7fc6e547bf4364f97f4f36 Mon Sep 17 00:00:00 2001 From: TuxSH <1922548+TuxSH@users.noreply.github.com> Date: Fri, 21 Jul 2023 11:30:55 +0200 Subject: [PATCH] Fix external module loading for firm modules such as TwlBg Closes #1919 and #1921 --- arm9/source/firm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arm9/source/firm.c b/arm9/source/firm.c index b759f9afd..0554a3fef 100755 --- a/arm9/source/firm.c +++ b/arm9/source/firm.c @@ -471,6 +471,8 @@ static void mergeSection0(FirmwareType firmType, u32 firmVersion, bool loadFromS memcmp(moduleList[i].name, ((Cxi *)dst)->exHeader.systemControlInfo.appTitle, sizeof(((Cxi *)dst)->exHeader.systemControlInfo.appTitle)) != 0) error("An external FIRM module is invalid or corrupted."); + dst += dstModuleSize; + maxModuleSize -= dstModuleSize; continue; } }