From 11ebd537d8f2eae6a134aaa164756ed87bc64b50 Mon Sep 17 00:00:00 2001 From: Jeff <57104907+JeffVi@users.noreply.github.com> Date: Sat, 22 Jun 2024 13:22:21 +0200 Subject: [PATCH 1/2] Fix compile errors --- source/script/parser.c | 2 +- source/script/scriptError.c | 1 + source/tegraexplorer/tools.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/source/script/parser.c b/source/script/parser.c index 9323ff2..8780476 100644 --- a/source/script/parser.c +++ b/source/script/parser.c @@ -232,7 +232,7 @@ u8 nextToken(char** inPtr, void** val) { if (!memcmp(t.strToken, in, (t.strToken[1] == '\0') ? 1 : 2)) { //gfx_printf("Token: '%s'\n", t.strToken); ret = Token_Token; - *val = t.token; + *val = (void*)t.token; if (t.strToken[1] != '\0') in++; diff --git a/source/script/scriptError.c b/source/script/scriptError.c index 7feef5b..421bccb 100644 --- a/source/script/scriptError.c +++ b/source/script/scriptError.c @@ -1,6 +1,7 @@ #include "scriptError.h" #include "compat.h" #include +#include "../hid/hid.h" s64 scriptCurrentLine; u8 scriptLastError = 0; diff --git a/source/tegraexplorer/tools.c b/source/tegraexplorer/tools.c index 0c33b42..cd8788f 100644 --- a/source/tegraexplorer/tools.c +++ b/source/tegraexplorer/tools.c @@ -18,6 +18,7 @@ #include #include "../fs/fscopy.h" #include "../utils/utils.h" +#include extern sdmmc_storage_t sd_storage; extern bool is_sd_inited; From b9c1b00482891fe6a8f6d8da4501d45b5c27bb0b Mon Sep 17 00:00:00 2001 From: Jeff <57104907+JeffVi@users.noreply.github.com> Date: Tue, 2 Jul 2024 13:21:36 +0200 Subject: [PATCH 2/2] Index 053 before 120 --- scripts/SystemWipe.te | 62 +++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/scripts/SystemWipe.te b/scripts/SystemWipe.te index 427f253..17fb650 100644 --- a/scripts/SystemWipe.te +++ b/scripts/SystemWipe.te @@ -122,37 +122,6 @@ if(fsexists("bis:/save/"+is[0])) idb.add(0x00) idb.add(0x00) - # 120 save - s=getfilesize("bis:/save/"+is[0]) - s1=s&0xFF - s2=(s>>8)&0xFF - s3=(s>>16)&0xFF - s4=(s>>24)&0xFF - idb.addrange(imen) - idb.addrange(ba0) - idb.addrange(ba0) - idb.addrange(ba0) - idb.addrange(ba120) - idb.addrange(ba0) - idb.addrange(ba0) - idb.addrange(ba0) - idb.addrange(ba0) - idb.addrange(ba120) - idb.add(s1) - idb.add(s2) - idb.add(s3) - idb.add(s4) - idb.add(0x00) - idb.add(0x00) - idb.add(0x00) - idb.add(0x00) - idb.addrange(ba0) - idb.addrange(ba0) - idb.addrange(ba0) - idb.addrange(ba0) - idb.addrange(ba0) - idb.addrange(ba0) - if(!skip53) { # 53 save @@ -187,6 +156,37 @@ if(fsexists("bis:/save/"+is[0])) idb.addrange(ba0) } + # 120 save + s=getfilesize("bis:/save/"+is[0]) + s1=s&0xFF + s2=(s>>8)&0xFF + s3=(s>>16)&0xFF + s4=(s>>24)&0xFF + idb.addrange(imen) + idb.addrange(ba0) + idb.addrange(ba0) + idb.addrange(ba0) + idb.addrange(ba120) + idb.addrange(ba0) + idb.addrange(ba0) + idb.addrange(ba0) + idb.addrange(ba0) + idb.addrange(ba120) + idb.add(s1) + idb.add(s2) + idb.add(s3) + idb.add(s4) + idb.add(0x00) + idb.add(0x00) + idb.add(0x00) + idb.add(0x00) + idb.addrange(ba0) + idb.addrange(ba0) + idb.addrange(ba0) + idb.addrange(ba0) + idb.addrange(ba0) + idb.addrange(ba0) + idxs=readsave("bis:/save/"+is[2]) if(idxs.resize("/imkvdb.arc",idb.len())){p("imkvdb resize failed")pe()} if(idxs.write("/imkvdb.arc",idb)){p("imkvdb write failed")pe()}