mirror of
https://github.com/appgurueu/modlib.git
synced 2024-08-19 21:04:13 +02:00
Lua log file: Fix list handling
This commit is contained in:
parent
29f7960464
commit
77ac8ba640
@ -142,13 +142,10 @@ 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)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user