From 82b19ba044aad4938056210d4f9440c6f04603ec Mon Sep 17 00:00:00 2001 From: "Tom Breton (Tehom)" Date: Mon, 23 May 2011 16:00:26 -0400 Subject: [PATCH] klink_call_cfunc, use variable-sized array --- klink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/klink.c b/klink.c index dd02bbc..a560de9 100644 --- a/klink.c +++ b/klink.c @@ -7827,7 +7827,7 @@ klink_call_cfunc (klink * sc, pko functor, pko env, pko args) { const kt_cfunc * p_cfunc = get_cfunc_func (functor); assert(p_cfunc->argcheck); - const int max_args = 5; + const int max_args = destructure_how_many (p_cfunc->argcheck); pko arg_array[max_args]; destructure_to_array(sc,args, p_cfunc->argcheck, -- 2.11.4.GIT