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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user