mirror of
https://github.com/CPunch/Cosmo.git
synced 2024-11-22 07:20:05 +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;
|
CObjClosure *closure = method->closure;
|
||||||
|
|
||||||
if (args+1 != closure->function->args) {
|
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;
|
return COSMOVM_RUNTIME_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ COSMOVMRESULT cosmoV_call(CState *state, int args) {
|
|||||||
CObjClosure *closure = cosmoV_readClosure(ret);
|
CObjClosure *closure = cosmoV_readClosure(ret);
|
||||||
|
|
||||||
if (args+1 != closure->function->args) {
|
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;
|
return COSMOVM_RUNTIME_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user