1
0
Fork 0
mirror of https://github.com/suchmememanyskill/TegraExplorer.git synced 2024-09-18 21:13:24 +01:00

[script] Fix <= and >=

This commit is contained in:
suchmememanyskill 2021-01-10 23:19:51 +01:00
parent 5057bb2863
commit d27832effb
2 changed files with 20 additions and 3 deletions

View file

@ -343,6 +343,7 @@ scriptFunction(funcMkdir){
return varInt((f_mkdir(vars[0].stringType)));
}
// Args: Str
scriptFunction(funcReadDir){
int res = 0;
Vector_t files = ReadFolder(vars[0].stringType, &res);
@ -369,26 +370,32 @@ scriptFunction(funcReadDir){
return newVar(StringArrayType, 1, .vectorType = fileNames);
}
// Args: Str, Str
scriptFunction(funcCopyDir){
return varInt((FolderCopy(vars[0].stringType, vars[1].stringType).err));
}
// Args: Str
scriptFunction(funcDelDir){
return varInt((FolderDelete(vars[0].stringType).err));
}
// Args: Str
scriptFunction(funcDelFile){
return varInt((f_unlink(vars[0].stringType)));
}
// Args: Str, Str
scriptFunction(funcMmcDump){
return varInt((DumpOrWriteEmmcPart(vars[0].stringType, vars[1].stringType, 0, 1).err));
}
// Args: Str, Str, Int
scriptFunction(funcMmcRestore){
return varInt((DumpOrWriteEmmcPart(vars[0].stringType, vars[1].stringType, 1, vars[2].integerType).err));
}
// Args: Str
scriptFunction(funcGetNcaType){
if (!TConf.keysDumped)
return ErrVar(ERRFATALFUNCFAIL);
@ -396,6 +403,7 @@ scriptFunction(funcGetNcaType){
return varInt((GetNcaType(vars[0].stringType)));
}
// Args: Str
scriptFunction(funcSignSave){
if (!TConf.keysDumped)
return ErrVar(ERRFATALFUNCFAIL);
@ -409,6 +417,7 @@ scriptFunction(funcGetMs){
extern int launch_payload(char *path);
// Args: Str
scriptFunction(funcLaunchPayload){
return varInt(launch_payload(vars[0].stringType));
}

View file

@ -251,16 +251,24 @@ Vector_t runLexer(const char* in, u32 len) {
vecAddElement(&vec, makeLexarToken(BitShiftRight, 0));
in++;
}
else
else {
int a = (in[1] == '=') ? 1 : 0;
vecAddElement(&vec, makeLexarToken(Bigger, 0));
in += a;
}
}
ELIFC('<'){
if (in[1] == '<'){
vecAddElement(&vec, makeLexarToken(BitShiftLeft, 0));
in++;
}
else
vecAddElement(&vec, makeLexarToken(Smaller, 0));
else {
int a = (in[1] == '=') ? 1 : 0;
vecAddElement(&vec, makeLexarToken(Smaller + a, 0));
in += a;
}
}
else {
int val = 0;