Skip to content

Commit 043e2d2

Browse files
committed
Fix bug in loadNintendoFirm
1 parent b15e5fa commit 043e2d2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

arm9/source/firm.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,10 @@ u32 loadNintendoFirm(FirmwareType *firmType, FirmwareSource nandType, bool loadF
222222
};
223223

224224
u32 i;
225-
for(i = 0; i < 4; i++) if(memcmp(firm->section[1].hash, hashes[i], 0x20) == 0) break;
225+
for(i = 0; i < sizeof(hashes)/sizeof(hashes[0]); i++)
226+
{
227+
if(memcmp(firm->section[1].hash, hashes[i], 0x20) == 0) break;
228+
}
226229

227230
switch(i)
228231
{

0 commit comments

Comments
 (0)