Fix derps

This commit is contained in:
Aurora 2016-09-23 19:20:42 +02:00
parent fb274538e1
commit 3010699f20

View File

@ -42,7 +42,7 @@ void main()
if(pathSize > 5 && pathSize < 40) if(pathSize > 5 && pathSize < 40)
{ {
char path[pathSize]; char path[pathSize + 1];
unsigned int read; unsigned int read;
f_read(&pathFile, path, pathSize, &read); f_read(&pathFile, path, pathSize, &read);
if(path[pathSize - 1] == 0xA) pathSize--; if(path[pathSize - 1] == 0xA) pathSize--;
@ -58,7 +58,7 @@ void main()
f_close(&pathFile); f_close(&pathFile);
} }
if(!foundPayload) foundPayload = f_open(&payload, "arm9loaderhax.bin", FA_READ); if(!foundPayload) foundPayload = f_open(&payload, "arm9loaderhax.bin", FA_READ) == FR_OK;
if(foundPayload) if(foundPayload)
{ {