added string.sub()

This commit is contained in:
2020-12-31 02:26:06 -06:00
parent e993cdd9fa
commit e253129e50
4 changed files with 71 additions and 17 deletions

View File

@@ -673,9 +673,9 @@ int cosmoV_execute(CState *state) {
// call closure/cfunction
if (IS_CFUNCTION(val)) {
callCFunction(state, cosmoV_readCFunction(val), args, nres, 0);
callCFunction(state, cosmoV_readCFunction(val), args, nres, -1);
} else if (IS_CLOSURE(val)) {
call(state, cosmoV_readClosure(val), args, nres, 0);
call(state, cosmoV_readClosure(val), args, nres, -1);
} else {
cosmoV_error(state, "Cannot call non-function value %s!", cosmoV_typeStr(val));
return -1;