remove memory(), add cwd(), #REQUIRE SD

This commit is contained in:
suchmememanyskill
2021-07-27 21:05:32 +02:00
parent 40d8bb8ba4
commit 797a5f95b5
6 changed files with 23 additions and 20 deletions

View File

@@ -15,6 +15,7 @@
#ifndef WIN32
#include "../tegraexplorer/tconf.h"
#include <storage/nx_sd.h>
#endif
static inline int isValidWord(char c) {
@@ -123,6 +124,17 @@ u8 nextToken(char** inPtr, void** val) {
return Token_Fatal_Err;
}
}
else if (!memcmp(in + 9, "SD", 2)) {
#ifdef WIN32
u8 gotSd = 0;
#else
u8 gotSd = sd_mount();
#endif
if (!gotSd){
printScriptError(SCRIPT_LEXER_FATAL, "Sd required.");
return Token_Fatal_Err;
}
}
}
while (*in && *in != '\n')