From 2a133df40d64ff49a1a672bf2ea7bd2843403810 Mon Sep 17 00:00:00 2001 From: Lars Mueller Date: Wed, 7 Sep 2022 11:42:37 +0200 Subject: [PATCH] Fix func.call_by_value nil handling --- func.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/func.lua b/func.lua index 3200206..61e8b0e 100644 --- a/func.lua +++ b/func.lua @@ -101,7 +101,7 @@ end --+ Calls func using the provided arguments, deepcopies all arguments function call_by_value(func, ...) - return func(unpack(modlib.table.deepcopy{...})) + return func(unpack(modlib.table.deepcopy{...}, 1, select("#", ...))) end -- Functional wrappers for Lua's builtin metatable operators (arithmetic, concatenation, length, comparison, indexing, call)