mirror of
https://github.com/CPunch/Cosmo.git
synced 2025-11-26 01:40:13 +00:00
Added assert() to base library
also fixed regression in call()
This commit is contained in:
@@ -173,7 +173,7 @@ bool call(CState *state, CObjClosure *closure, int args, int nresults, int offse
|
||||
state->top -= extraArgs;
|
||||
|
||||
pushCallFrame(state, closure, func->args + 1);
|
||||
} else if (args < func->args) { // too few args passed, obvious user error
|
||||
} else if (args != func->args) { // mismatched args
|
||||
cosmoV_error(state, "Expected %d arguments for %s, got %d!", closure->function->args, closure->function->name == NULL ? UNNAMEDCHUNK : closure->function->name->str, args);
|
||||
return false;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user