From 10f555b6fbf23d07add0be6f637a23adbab80dd9 Mon Sep 17 00:00:00 2001 From: Aurora Wright Date: Wed, 24 May 2017 15:26:26 +0200 Subject: [PATCH] Fix payload size check --- source/fs.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/fs.c b/source/fs.c index 3804ab3..8192b68 100644 --- a/source/fs.c +++ b/source/fs.c @@ -161,14 +161,12 @@ void loadPayload(u32 pressed, const char *payloadPath) payloadSize = fileRead(firm, path, maxPayloadSize); - if(!payloadSize || !checkFirmPayload()) return; + if(payloadSize <= 0x200 || !checkFirmPayload()) return; writeConfig(true); - if(!isSdMode) - sprintf(absPath, "nand:/rw/luma/%s", path); - else - sprintf(absPath, "sdmc:/luma/%s", path); + if(isSdMode) sprintf(absPath, "sdmc:/luma/%s", path); + else sprintf(absPath, "nand:/rw/luma/%s", path); char *argv[2] = {absPath, (char *)fbs}; initScreens();