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