1
0
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:
batrick
2009-07-16 03:43:23 +00:00
parent 0be861959f
commit a8891ec0ca

View File

@@ -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