mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-23 23:53:44 +01:00
Bugfix table_map: avoid infinite loop
This commit is contained in:
parent
a5c6e82ef3
commit
0498125ca7
@ -75,7 +75,7 @@ function worldeditadditions.table_map(tbl, func)
|
|||||||
local result = {}
|
local result = {}
|
||||||
for i,value in ipairs(tbl) do
|
for i,value in ipairs(tbl) do
|
||||||
local newval = func(value, i)
|
local newval = func(value, i)
|
||||||
if newval ~= nil then table.insert(tbl, newval) end
|
if newval ~= nil then table.insert(result, newval) end
|
||||||
end
|
end
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user