diff --git a/arm9/source/crypto.c b/arm9/source/crypto.c index fc2f6331..b3742b4c 100755 --- a/arm9/source/crypto.c +++ b/arm9/source/crypto.c @@ -339,7 +339,7 @@ int ctrNandInit(void) __attribute__((aligned(4))) u8 cid[AES_BLOCK_SIZE], shaSum[SHA_256_HASH_SIZE]; - if ((getFileSize(CID_PATH) > 0) && (CONFIG(HARDWAREPATCHING))) + if ((nandcid) && (CONFIG(HARDWAREPATCHING))) { memcpy(cid, (u32*)__NANDCID_ADDR, sizeof(cid)); diff --git a/arm9/source/crypto.h b/arm9/source/crypto.h index 08453cd3..16e14c28 100755 --- a/arm9/source/crypto.h +++ b/arm9/source/crypto.h @@ -114,6 +114,7 @@ #define SHA_1_HASH_SIZE (160 / 8) extern FirmwareSource ctrNandLocation; +extern bool nandcid; void sha(void *res, const void *src, u32 size, u32 mode);