From c2a4f8b442a592239f938e6e15c070416425dedc Mon Sep 17 00:00:00 2001 From: david Date: Sat, 27 Feb 2010 00:14:24 +0000 Subject: [PATCH] Quote string with Lua's %q format in nsedebug.tostr, so you can tell the difference between nil and "nil". --- nselib/nsedebug.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nselib/nsedebug.lua b/nselib/nsedebug.lua index f0e753498..8f3c2cabc 100644 --- a/nselib/nsedebug.lua +++ b/nselib/nsedebug.lua @@ -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