summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--libs/core/luasrc/util.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/core/luasrc/util.lua b/libs/core/luasrc/util.lua
index 233bfcc330..260fc16a00 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)