Less strict check for valid FIRM crypto

... only one partition has to match
This commit is contained in:
d0k3 2017-05-29 01:43:18 +02:00
parent 1f55ec9ca3
commit 57afda82ad

View File

@ -196,11 +196,11 @@ bool CheckFirmCrypto(void)
u8 buffer[0x200];
for (u32 i = 0; i < sizeof(sectors) / sizeof(u32); i++) {
ReadNandSectors(buffer, sectors[i], 1, 0x06);
if (memcmp(buffer, magic, sizeof(magic)) != 0) return false;
if (memcmp(buffer, magic, sizeof(magic)) == 0) return true;
}
// success if we arrive here
return true;
// failed if we arrive here
return false;
}
void CryptNand(void* buffer, u32 sector, u32 count, u32 keyslot)