Bugfix table_map: avoid infinite loop

This commit is contained in:
Starbeamrainbowlabs 2021-05-30 00:12:13 +01:00
parent a5c6e82ef3
commit 0498125ca7
No known key found for this signature in database
GPG Key ID: 1BE5172E637709C2

@ -75,7 +75,7 @@ function worldeditadditions.table_map(tbl, func)
local result = {}
for i,value in ipairs(tbl) do
local newval = func(value, i)
if newval ~= nil then table.insert(tbl, newval) end
if newval ~= nil then table.insert(result, newval) end
end
return result
end