From 043e2d2497f972f9194f869ff41da299835ecf41 Mon Sep 17 00:00:00 2001 From: TuxSH <1922548+TuxSH@users.noreply.github.com> Date: Mon, 30 Dec 2024 14:29:32 +0100 Subject: [PATCH] Fix bug in loadNintendoFirm --- arm9/source/firm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arm9/source/firm.c b/arm9/source/firm.c index e329659ee..04eae3245 100755 --- a/arm9/source/firm.c +++ b/arm9/source/firm.c @@ -222,7 +222,10 @@ u32 loadNintendoFirm(FirmwareType *firmType, FirmwareSource nandType, bool loadF }; u32 i; - for(i = 0; i < 4; i++) if(memcmp(firm->section[1].hash, hashes[i], 0x20) == 0) break; + for(i = 0; i < sizeof(hashes)/sizeof(hashes[0]); i++) + { + if(memcmp(firm->section[1].hash, hashes[i], 0x20) == 0) break; + } switch(i) {