fixed invalid objection string

This commit is contained in:
CPunch 2020-11-12 16:27:50 -06:00
parent 93130ede65
commit 0e92ddea2b
1 changed files with 2 additions and 2 deletions

View File

@ -161,7 +161,7 @@ COSMOVMRESULT cosmoV_call(CState *state, int args) {
CObjClosure *closure = method->closure;
if (args+1 != closure->function->args) {
runtimeError(state, "Expected %d parameters for %s, got %d!", closure->function->args, closure->function->name == NULL ? UNNAMEDCHUNK : closure->function->name->str, args);
runtimeError(state, "Expected %d parameters for %s, got %d!", closure->function->args, closure->function->name == NULL ? UNNAMEDCHUNK : closure->function->name->str, args+1);
return COSMOVM_RUNTIME_ERR;
}
@ -191,7 +191,7 @@ COSMOVMRESULT cosmoV_call(CState *state, int args) {
CObjClosure *closure = cosmoV_readClosure(ret);
if (args+1 != closure->function->args) {
runtimeError(state, "Expected %d parameters for %s, got %d!", closure->function->args, closure->function->name == NULL ? UNNAMEDCHUNK : closure->function->name->str, args);
runtimeError(state, "Expected %d parameters for %s, got %d!", closure->function->args, closure->function->name == NULL ? UNNAMEDCHUNK : closure->function->name->str, args+1);
return COSMOVM_RUNTIME_ERR;
}