Skip to content
Snippets Groups Projects
Commit 87436992 authored by Jeija's avatar Jeija
Browse files

Luacontroller: Fix bugs in 703e6fda, no more functions as keys

Thanks to @ShadowNinja for reporting this
Make sure functions that are keys in tables and functions inside nested tables also get removed when using digiline_send.
parent 703e6fda
No related branches found
No related tags found
No related merge requests found
......@@ -157,10 +157,12 @@ function mesecon.tablecopy_stripfunctions(table) -- deep table copy, but remove
local newtable = {}
for idx, item in pairs(table) do
if type(item) == "table" then
newtable[idx] = mesecon.tablecopy(item)
elseif type(item) ~= "function" then
newtable[idx] = item
if type(idx) ~= "function" then
if type(item) == "table" then
newtable[idx] = mesecon.tablecopy_stripfunctions(item)
elseif type(item) ~= "function" then
newtable[idx] = item
end
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment