mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2025-04-09 18:21:25 +02:00
Bugfix table_map: avoid infinite loop
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user