From: Steven Barth Date: Thu, 28 Aug 2008 18:57:34 +0000 (+0000) Subject: Fixed luci.util.dumptable again X-Git-Tag: 0.8.0~260 X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=8f03192ce4b39906db82658b0543e237e2a757d2 Fixed luci.util.dumptable again --- diff --git a/libs/core/luasrc/util.lua b/libs/core/luasrc/util.lua index 233bfcc33..260fc16a0 100644 --- 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)