Minor stuff

This commit is contained in:
Aurora 2016-04-26 01:30:03 +02:00
parent 1f68c2da42
commit 4cbf4e93e7
3 changed files with 7 additions and 7 deletions

View File

@ -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)];

View File

@ -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);

View File

@ -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];