mirror of
https://github.com/nmap/nmap.git
synced 2025-12-28 18:39:03 +00:00
If the old _index metamethod does not exist then do not use it. This would
cause "attempt to index a nil value" errors when whatever is being made "strict" did not have a metatable (the global environment for example).
This commit is contained in:
@@ -60,7 +60,7 @@ function strict ()
|
||||
if type(_index) == "function" then
|
||||
local v = _index(t, n); -- hook it
|
||||
if v ~= nil then return v end
|
||||
else
|
||||
elseif _index ~= nil then
|
||||
local v = _index[n];
|
||||
if v ~= nil then return v end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user