Fixes an issue that caused long integers to be expressed in scientific notation. Fixes #807

This commit is contained in:
nnposter 2017-04-09 13:33:31 +00:00
parent 37287ad664
commit 3952e2fd62
2 changed files with 4 additions and 1 deletions

View file

@ -1,5 +1,8 @@
# Nmap Changelog ($Id$); -*-text-*-
o [NSE][GH#807] Fixed a JSON library issue that was causing long integers
to be expressed in the scientific/exponent notation. [nnposter]
o [Ncat] Made -i/--idle-timeout not cause Ncat in server mode to close while
waiting for an initial connection. This was also causing -i to interfere with
the HTTP proxy server mode. [Carlos Manso, Daniel Miller]

View file

@ -233,7 +233,7 @@ function generate(obj)
elseif obj == true then
return "true"
elseif type(obj) == "number" then
return string.format("%g", obj)
return tostring(obj)
elseif type(obj) == "string" then
return escape(obj)
elseif type(obj) == "table" then