From 4cbf4e93e77c4ac4b68f54052e72632e5108383b Mon Sep 17 00:00:00 2001 From: Aurora Date: Tue, 26 Apr 2016 01:30:03 +0200 Subject: [PATCH] Minor stuff --- injector/source/patcher.c | 2 +- source/crypto.c | 10 +++++----- source/fs.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/injector/source/patcher.c b/injector/source/patcher.c index 95d5fe4..2316ec2 100644 --- a/injector/source/patcher.c +++ b/injector/source/patcher.c @@ -143,7 +143,7 @@ static int loadTitleLocaleConfig(u64 progId, u8 *regionId, u8 *languageId) u32 i = 29; - while(progId > 0) + while(progId) { static const char hexDigits[] = "0123456789ABCDEF"; path[i--] = hexDigits[(u32)(progId & 0xF)]; diff --git a/source/crypto.c b/source/crypto.c index 9db30f3..9b1fd46 100755 --- a/source/crypto.c +++ b/source/crypto.c @@ -348,9 +348,9 @@ void decryptExeFs(u8 *inbuf) void arm9Loader(u8 *arm9Section, u32 mode) { //Firm keys - u8 keyY[0x10]; - u8 arm9BinCTR[0x10]; - u8 arm9BinSlot = mode ? 0x16 : 0x15; + u8 keyY[0x10], + arm9BinCTR[0x10], + arm9BinSlot = mode ? 0x16 : 0x15; //Setup keys needed for arm9bin decryption memcpy(keyY, arm9Section + 0x10, 0x10); @@ -384,8 +384,8 @@ void arm9Loader(u8 *arm9Section, u32 mode) //Set >=9.6 KeyXs if(mode) { - u8 keyData[0x10] = {0xDD, 0xDA, 0xA4, 0xC6, 0x2C, 0xC4, 0x50, 0xE9, 0xDA, 0xB6, 0x9B, 0x0D, 0x9D, 0x2A, 0x21, 0x98}; - u8 decKey[0x10]; + u8 keyData[0x10] = {0xDD, 0xDA, 0xA4, 0xC6, 0x2C, 0xC4, 0x50, 0xE9, 0xDA, 0xB6, 0x9B, 0x0D, 0x9D, 0x2A, 0x21, 0x98}, + decKey[0x10]; //Set keys 0x19..0x1F keyXs aes_use_keyslot(0x11); diff --git a/source/fs.c b/source/fs.c index 604117b..6428f7a 100644 --- a/source/fs.c +++ b/source/fs.c @@ -100,7 +100,7 @@ void firmRead(void *dest, const char *firmFolder) u32 i = 42; //Convert back the .app name from integer to array - while(id > 0) + while(id) { static const char hexDigits[] = "0123456789ABCDEF"; path[i--] = hexDigits[id & 0xF];