Skip to content

Commit

Permalink
Fix bug in loadNintendoFirm
Browse files Browse the repository at this point in the history
  • Loading branch information
TuxSH committed Dec 30, 2024
1 parent b15e5fa commit 043e2d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arm9/source/firm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

1 comment on commit 043e2d2

@impeeza
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merry Christmas and a Happy New year, Sorry the Spam but I only wanted to thank you all your hard work.

Please sign in to comment.