From 57afda82ad5b7549fa7e75af3de433f898ab51e5 Mon Sep 17 00:00:00 2001 From: d0k3 Date: Mon, 29 May 2017 01:43:18 +0200 Subject: [PATCH] Less strict check for valid FIRM crypto ... only one partition has to match --- source/nand/nand.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/nand/nand.c b/source/nand/nand.c index ccc7597..8551823 100644 --- a/source/nand/nand.c +++ b/source/nand/nand.c @@ -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)