projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b28f46
)
Fixed luci.util.dumptable again
author
Steven Barth
<steven@midlink.org>
Thu, 28 Aug 2008 18:57:34 +0000
(18:57 +0000)
committer
Steven Barth
<steven@midlink.org>
Thu, 28 Aug 2008 18:57:34 +0000
(18:57 +0000)
libs/core/luasrc/util.lua
patch
|
blob
|
history
diff --git
a/libs/core/luasrc/util.lua
b/libs/core/luasrc/util.lua
index 233bfcc3301866b92f246c4fcc3b5cc5ba15e549..260fc16a00fb5853f15a3ad37a65febcadba8fb1 100644
(file)
--- a/
libs/core/luasrc/util.lua
+++ b/
libs/core/luasrc/util.lua
@@
-191,7
+191,7
@@
function dumptable(t, maxdepth, i, seen)
for k,v in pairs(t) do
perror(string.rep("\t", i) .. tostring(k) .. "\t" .. tostring(v))
- if type(v) == "table" and
i < maxdepth
then
+ if type(v) == "table" and
(not maxdepth or i < maxdepth)
then
if not seen[v] then
seen[v] = true
dumptable(v, maxdepth, i+1, seen)