Fix dumpTable function to ensure keys and values are converted to strings before printing

This commit is contained in:
2025-05-18 16:05:03 +02:00
parent b4a4011b18
commit a564178ca2

View File

@@ -18,10 +18,10 @@ if not shared.dumpTable then
end end
for k, v in pairs(table) do for k, v in pairs(table) do
if type(v) == "table" then if type(v) == "table" then
print(string.rep(" ", depth) .. k .. ":") print(string.rep(" ", depth) .. tostring(k) .. ":")
shared.dumpTable(v, nil, depth + 1) shared.dumpTable(v, nil, depth + 1)
else else
print(string.rep(" ", depth) .. k .. ": ", v) print(string.rep(" ", depth) .. tostring(k) .. ": " .. tostring(v))
end end
end end
end end