mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-18 14:36:48 +00:00
Fix wml.remove_children
This commit is contained in:
parent
1bf05fb862
commit
0ef4a86b7e
@ -123,8 +123,8 @@ end
|
||||
--! Removes all matching child tags from @a cfg
|
||||
function wml.remove_children(cfg, ...)
|
||||
for i = #cfg, 1, -1 do
|
||||
for _,v in ipairs(...) do
|
||||
if cfg[i] == v then
|
||||
for j = 1, select('#', ...) do
|
||||
if cfg[i] and cfg[i][1] == select(j, ...) then
|
||||
table.remove(cfg, i)
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user