Lua: Fix console pretty-print output not showing zero or negative keys in tables
This commit is contained in:
parent
add5476964
commit
4fbf33a0ca
1 changed files with 3 additions and 1 deletions
|
@ -50,7 +50,9 @@ function ilua.join(tbl,delim,limit,depth)
|
|||
end
|
||||
for key,v in pairs(tbl) do
|
||||
if type(key) == 'number' then
|
||||
if key <= n then goto continue end
|
||||
if n > 0 and key > 0 and key <= n and math.type(key) == 'integer' then
|
||||
goto continue
|
||||
end
|
||||
key = '['..tostring(key)..']'
|
||||
else
|
||||
key = tostring(key)
|
||||
|
|
Loading…
Add table
Reference in a new issue