1
0
Fork 0
mirror of https://github.com/suchmememanyskill/TegraExplorer.git synced 2024-11-09 13:41:45 +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){ if (var->variableType != FunctionClass){
SCRIPT_FATAL_ERR("Call on non function class"); SCRIPT_FATAL_ERR("Call on non function class");
} }
if (var->function.builtIn) {
// TODO: implement arg handling
Function_t* f = ref->extra; Function_t* f = ref->extra;
if (var->function.builtIn) {
if (f->operations.count == 0) { if (f->operations.count == 0) {
return genericCallDirect(var, NULL, 0); return genericCallDirect(var, NULL, 0);
} }
@ -184,10 +181,14 @@ Variable_t* genericCall(Variable_t* var, CallArgs_t* ref) {
} }
} }
else { else {
Variable_t *ret = eval(var->function.function.operations.data, var->function.function.operations.count, 1); if (f->operations.count){
if (ret == NULL) if (eval(f->operations.data, f->operations.count, 0) == NULL)
return NULL; return NULL;
removePendingReference(ret); }
if (eval(var->function.function.operations.data, var->function.function.operations.count, 0) == NULL)
return NULL;
return &emptyClass; return &emptyClass;
} }
} }