mirror of
https://github.com/nmap/nmap.git
synced 2026-08-27 03:48:14 +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:
parent
8b13026ef9
commit
fdd82d1576
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue