mirror of
https://github.com/nmap/nmap.git
synced 2026-01-09 16:09:03 +00:00
Changed stdnse.tohex to no longer create tables unnecessarily if options
are ommitted.
This commit is contained in:
@@ -9,6 +9,8 @@ local max = math.max
|
||||
local ceil = math.ceil
|
||||
local type = type
|
||||
|
||||
local EMPTY = {}; -- Empty constant table
|
||||
|
||||
module(... or "stdnse");
|
||||
|
||||
--- Prints debug information according with verbosity <i>level</i>
|
||||
@@ -157,7 +159,7 @@ end
|
||||
--@param options table specifiying formatting options
|
||||
--@return hexadecimal encoded string
|
||||
function tohex( s, options )
|
||||
options = options or {}
|
||||
options = options or EMPTY
|
||||
local separator = options.separator
|
||||
local hex
|
||||
|
||||
|
||||
Reference in New Issue
Block a user