1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-18 16:25:11 +00:00

Fix error behavior when calling functions with incorrect arities.

This commit is contained in:
Calvin Rose
2018-12-30 18:41:44 -05:00
parent 8dde89126e
commit 6b4824c2ab
3 changed files with 24 additions and 18 deletions

View File

@@ -988,6 +988,10 @@ JanetSignal janet_call(
JanetFiber **f) {
JanetFiber *fiber = janet_fiber_n(fun, 64, argv, argn);
if (f) *f = fiber;
if (!fiber) {
*out = janet_cstringv("arity mismatch");
return JANET_SIGNAL_ERROR;
}
return janet_continue(fiber, janet_wrap_nil(), out);
}