mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-22 07:13:45 +01:00
Lua log file: Fix list handling
This commit is contained in:
parent
29f7960464
commit
77ac8ba640
@ -142,12 +142,9 @@ local function _dump(self, value, is_key)
|
|||||||
create_reference()
|
create_reference()
|
||||||
-- TODO traverse tables to determine whether this is actually needed
|
-- TODO traverse tables to determine whether this is actually needed
|
||||||
self:log(key .. "={}")
|
self:log(key .. "={}")
|
||||||
local tablelen = #value
|
|
||||||
for k, v in pairs(value) do
|
for k, v in pairs(value) do
|
||||||
if type(k) ~= "number" or k % 1 ~= 0 or k < 1 or k > tablelen then
|
local dumped, short = _dump(self, k, true)
|
||||||
local dumped, short = _dump(self, k, true)
|
self:log(key .. (short and ("." .. dumped) or ("[" .. dumped .. "]")) .. "=" .. _dump(self, v))
|
||||||
self:log(key .. (short and ("." .. dumped) or ("[" .. dumped .. "]")) .. "=" .. _dump(self, v))
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
error("unsupported type: " .. _type)
|
error("unsupported type: " .. _type)
|
||||||
|
Loading…
Reference in New Issue
Block a user