1
0
Fork 0
mirror of https://github.com/suchmememanyskill/TegraExplorer.git synced 2024-12-26 19:36:03 +00:00

re-implement tsv2 bug

This commit is contained in:
suchmememanyskill 2021-07-27 22:00:18 +02:00
parent 094d43916c
commit 192568b686

View file

@ -112,11 +112,8 @@ Variable_t* genericCall(Variable_t* var, CallArgs_t* ref) {
if (var->variableType != FunctionClass){
SCRIPT_FATAL_ERR("Call on non function class");
}
Function_t* f = ref->extra;
if (var->function.builtIn) {
// TODO: implement arg handling
Function_t* f = ref->extra;
if (f->operations.count == 0) {
return genericCallDirect(var, NULL, 0);
}
@ -184,10 +181,14 @@ Variable_t* genericCall(Variable_t* var, CallArgs_t* ref) {
}
}
else {
Variable_t *ret = eval(var->function.function.operations.data, var->function.function.operations.count, 1);
if (ret == NULL)
if (f->operations.count){
if (eval(f->operations.data, f->operations.count, 0) == NULL)
return NULL;
}
if (eval(var->function.function.operations.data, var->function.function.operations.count, 0) == NULL)
return NULL;
removePendingReference(ret);
return &emptyClass;
}
}