1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Warn about a known bug in Lua 5.3.2 and earlier.

This commit is contained in:
dmiller
2018-10-16 05:18:29 +00:00
parent 2e98e2081a
commit daa48fdfb8

View File

@@ -239,6 +239,11 @@ local function log_error (fmt, ...)
log_write("stderr", format(fmt, ...));
end
-- Check for and warn about some known bad behaviors
if ("test"):gsub(".*$", "x") == "xx" then
log_error("Known bug in string.gsub in Lua 5.3 before 5.3.3 will cause bugs in NSE scripts.")
end
local function table_size (t)
local n = 0; for _ in pairs(t) do n = n + 1; end return n;
end