1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-24 00:19:01 +00:00

Call tostring on table keys before concatentating them in

nsedebug.tostr, so it at least doesn't crash when a table has another
table as a key.
This commit is contained in:
david
2009-08-03 23:48:06 +00:00
parent 8b13026ef9
commit fdd82d1576

View File

@@ -43,10 +43,10 @@ function tostr(data, indent)
for i, v in pairs(data) do
-- Check for a table in a table
if(type(v) == "table") then
str = str .. (" "):rep(indent) .. i .. ":\n"
str = str .. (" "):rep(indent) .. tostring(i) .. ":\n"
str = str .. tostr(v, indent + 2)
else
str = str .. (" "):rep(indent) .. i .. ": " .. tostr(v, 0)
str = str .. (" "):rep(indent) .. tostring(i) .. ": " .. tostr(v, 0)
end
end
else