mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +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:
parent
0be861959f
commit
a8891ec0ca
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue