1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 22:21:29 +00:00

Quote string with Lua's %q format in nsedebug.tostr, so you can tell the

difference between nil and "nil".
This commit is contained in:
david
2010-02-27 00:14:24 +00:00
parent 49e36a57f3
commit c2a4f8b442

View File

@@ -29,7 +29,7 @@ function tostr(data, indent)
if(type(data) == "nil") then
str = str .. (" "):rep(indent) .. "nil\n"
elseif(type(data) == "string") then
str = str .. (" "):rep(indent) .. data .. "\n"
str = str .. (" "):rep(indent) .. string.format("%q", data) .. "\n"
elseif(type(data) == "number") then
str = str .. (" "):rep(indent) .. data .. "\n"
elseif(type(data) == "boolean") then