Fix entity query bindings not making copy of tables they are modifying
This commit is contained in:
parent
297fb46bde
commit
f60ad2a712
@ -90,6 +90,8 @@ local entityTypes = {
|
||||
|
||||
local function entityTypeNamesToIntegers(input, fullName)
|
||||
if input then
|
||||
local output = {}
|
||||
|
||||
for i, v in ipairs(input) do
|
||||
-- could have used string.lower, but original engine does case-sensitive comparison here
|
||||
-- so we can save quite a lot cpu cycles for ourselves by not doing string.lower
|
||||
@ -99,10 +101,10 @@ local function entityTypeNamesToIntegers(input, fullName)
|
||||
error('invalid entity type ' .. tostring(v) .. ' for ' .. fullName .. ' in types table at index ' .. i, 3)
|
||||
end
|
||||
|
||||
input[i] = lookup
|
||||
output[i] = lookup
|
||||
end
|
||||
|
||||
return input
|
||||
return output
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user