mirror of
https://github.com/CPunch/Cosmo.git
synced 2024-11-21 15:00:06 +00:00
fixed invalid objection string
This commit is contained in:
parent
93130ede65
commit
0e92ddea2b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user