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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user