Error fix (attempt to compare nil with number)

This commit is contained in:
Luca Deri 2023-10-23 18:27:57 +02:00
parent 62d5f0e53e
commit ddda5d1824

View file

@ -808,7 +808,7 @@ function vs_utils.save_host_to_scan(scan_type, host, scan_result, last_scan_time
if last_scan_time or last_duration then
--local time_formatted = format_utils.formatEpoch(last_scan_time)
if last_duration <= 0 then
if (last_duration == nil) or (last_duration <= 0) then
last_duration = 1
end