1
0

Embedded functions now use info.params instead of the one pulled from the defining string.

This commit is contained in:
Jon Michael Aanes 2017-07-15 20:51:05 +02:00
parent 43581963d8
commit 3790f4e8a3

View File

@ -249,13 +249,14 @@ return function (value, depth, l, format_value)
if info.defined_how == 'string' then
-- Function was defined as a string
local params, body = get_function_paramlist_and_body(info)
local _, body = get_function_paramlist_and_body(info)
if #body <= NR_CHARS_IN_LONG_FUNCTION_BODY and not body:find '\n' then
function_params, function_body = params, body
function_body = body
end
end
if info.builtin and l.options.short_builtins then
assert(info.name)
return l(info.name);
end