mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Fix type comparisons to library names. Closes #1158
This commit is contained in:
parent
689ea0e05d
commit
02e3add66e
3 changed files with 3 additions and 3 deletions
|
|
@ -258,7 +258,7 @@ action = function(host, port)
|
|||
end
|
||||
|
||||
-- check if match arugment is a table or a single value
|
||||
if match and type(match) ~= table then
|
||||
if match and type(match) ~= 'table' then
|
||||
to_be_searched['User Pattern 1'] = {}
|
||||
table.insert(to_be_searched['User Pattern 1'], match)
|
||||
elseif type(match) == 'table' then
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ local function parse_args()
|
|||
-- An empty string for an export name indicates to the server that
|
||||
-- we wish to attach to the default export.
|
||||
arg = {}
|
||||
elseif type(arg) ~= table then
|
||||
elseif type(arg) ~= 'table' then
|
||||
arg = {arg}
|
||||
end
|
||||
args.export_name = arg
|
||||
|
|
|
|||
|
|
@ -2223,7 +2223,7 @@ end
|
|||
|
||||
function get_period( period )
|
||||
|
||||
if type( period ) ~= string or ( period == "" ) then return nil end
|
||||
if type( period ) ~= 'string' or ( period == "" ) then return nil end
|
||||
local quant, unit = period:match( "(-?+?%d*%.?%d*)([SsMmHhDd]?)" )
|
||||
if not ( tonumber( quant ) ) then return nil end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue