Fix derp (3)
This commit is contained in:
parent
0306556032
commit
1fcab825bf
@ -172,7 +172,7 @@ static inline bool loadTitleLocaleConfig(u64 progId, u8 *regionId, u8 *languageI
|
||||
|
||||
IFile file;
|
||||
|
||||
if(R_FAILED(openLumaFile(&file, path))) return 0;
|
||||
if(R_FAILED(openLumaFile(&file, path))) return true;
|
||||
|
||||
bool ret;
|
||||
u64 fileSize;
|
||||
|
@ -425,7 +425,7 @@ bool decryptNusFirm(const Ticket *ticket, Cxi *cxi, u32 ncchSize)
|
||||
|
||||
__attribute__((aligned(4))) const u8 keyY0x3D[AES_BLOCK_SIZE] = {0x0C, 0x76, 0x72, 0x30, 0xF0, 0x99, 0x8F, 0x1C, 0x46, 0x82, 0x82, 0x02, 0xFA, 0xAC, 0xBE, 0x4C};
|
||||
__attribute__((aligned(4))) u8 titleKey[AES_BLOCK_SIZE],
|
||||
cetkIv[AES_BLOCK_SIZE] = {0};
|
||||
cetkIv[AES_BLOCK_SIZE] = {0};
|
||||
memcpy(titleKey, ticket->titleKey, sizeof(titleKey));
|
||||
memcpy(cetkIv, ticket->titleId, sizeof(ticket->titleId));
|
||||
|
||||
|
@ -164,6 +164,7 @@ static inline u32 patchMpu(u8 *pos, u32 size)
|
||||
u32 patchEmuNand(u8 *arm9Section, u32 kernel9Size, u8 *process9Offset, u32 process9Size, u32 emuHeader, u8 *kernel9Address)
|
||||
{
|
||||
u8 *freeK9Space;
|
||||
|
||||
if(!getFreeK9Space(arm9Section, kernel9Size, &freeK9Space)) return 1;
|
||||
|
||||
u32 ret = 0;
|
||||
|
@ -89,7 +89,7 @@ void detectAndProcessExceptionDumps(void)
|
||||
{
|
||||
volatile ExceptionDumpHeader *dumpHeader = (volatile ExceptionDumpHeader *)0x25000000;
|
||||
|
||||
if(dumpHeader->magic[0] != 0xDEADC0DE || dumpHeader->magic[1] == 0xDEADCAFE || (dumpHeader->processor != 9 && dumpHeader->processor != 11)) return;
|
||||
if(dumpHeader->magic[0] != 0xDEADC0DE || dumpHeader->magic[1] != 0xDEADCAFE || (dumpHeader->processor != 9 && dumpHeader->processor != 11)) return;
|
||||
|
||||
const vu32 *regs = (vu32 *)((vu8 *)dumpHeader + sizeof(ExceptionDumpHeader));
|
||||
const vu8 *stackDump = (vu8 *)regs + dumpHeader->registerDumpSize + dumpHeader->codeDumpSize;
|
||||
|
13
source/fs.c
13
source/fs.c
@ -38,23 +38,17 @@ static FATFS sdFs,
|
||||
static bool switchToMainDir(bool isSd)
|
||||
{
|
||||
const char *mainDir = isSd ? "/luma" : "/rw/luma";
|
||||
bool ret;
|
||||
|
||||
switch(f_chdir(mainDir))
|
||||
{
|
||||
case FR_OK:
|
||||
ret = true;
|
||||
break;
|
||||
return true;
|
||||
case FR_NO_PATH:
|
||||
f_mkdir(mainDir);
|
||||
ret = switchToMainDir(isSd);
|
||||
break;
|
||||
return switchToMainDir(isSd);
|
||||
default:
|
||||
ret = false;
|
||||
break;
|
||||
return false;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool mountFs(bool isSd, bool switchToCtrNand)
|
||||
@ -191,6 +185,7 @@ void payloadMenu(void)
|
||||
while(f_readdir(&dir, &info) == FR_OK && info.fname[0] != 0 && payloadNum < 20)
|
||||
{
|
||||
if(info.fname[0] == '.' || memcmp(info.altname + 8, ".BIN", 4) != 0) continue;
|
||||
|
||||
u32 nameLength = strlen(info.fname) - 4;
|
||||
|
||||
if(nameLength > 48) continue;
|
||||
|
Reference in New Issue
Block a user