Fix vector indexing stack overflow

This commit is contained in:
Lars Mueller 2021-10-10 19:59:53 +02:00
parent 9d28fb24d4
commit 1b85482ca7

@ -1,5 +1,5 @@
-- Localize globals -- Localize globals
local assert, math, pairs, rawset, setmetatable, unpack, vector = assert, math, pairs, rawset, setmetatable, unpack, vector local assert, math, pairs, rawget, rawset, setmetatable, unpack, vector = assert, math, pairs, rawget, rawset, setmetatable, unpack, vector
-- Set environment -- Set environment
local _ENV = {} local _ENV = {}
@ -19,7 +19,7 @@ metatable = {
__index = function(table, key) __index = function(table, key)
local index = index_aliases[key] local index = index_aliases[key]
if index ~= nil then if index ~= nil then
return table[index] return rawget(table, index)
end end
return _ENV[key] return _ENV[key]
end, end,