From 1826b54dcb403c6ddcbd644355df3de7ace1ded2 Mon Sep 17 00:00:00 2001 From: PabloMK7 Date: Sat, 15 Mar 2025 22:29:48 +0100 Subject: [PATCH] Check for null file (fastboot3ds issue) --- plugin/sources/ArticFunctions.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugin/sources/ArticFunctions.cpp b/plugin/sources/ArticFunctions.cpp index 8fc39b3..5042bae 100644 --- a/plugin/sources/ArticFunctions.cpp +++ b/plugin/sources/ArticFunctions.cpp @@ -658,6 +658,15 @@ namespace ArticFunctions { u32 bytes_read = 0; res = FSFILE_Read(file, &bytes_read, 0, ret_buf->data, (u32)size); FSFILE_Close(file); + if (R_SUCCEEDED(res) && bytes_read == size) { + u64 check_null = *reinterpret_cast(ret_buf->data); + if (check_null == 0) { + logger.Error("The OTP backup in your SD card is empty\n This is an known issue with fastboot3DS\n Dump the otp file manually and place in:"); + logger.Error(filePath); + mi.FinishGood(-3); + return; + } + } mi.FinishGood(bytes_read != size ? -2 : res); } else if (type == 4) { Result res = cfguInit();