Skip to content

Commit

Permalink
Fix bad index in removevalues
Browse files Browse the repository at this point in the history
When the table.remove call from split into its own reverse iterating loop, the table.remove call was still using the `k` variable from the old loop rather than the new `i` index.
  • Loading branch information
billfreist authored Nov 6, 2024
1 parent c4e45e2 commit 53465a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/base/bake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
for i = #tbl, 1, -1 do
for _, pattern in ipairs(removes) do
if pattern == tbl[i] then
table.remove(tbl, k)
table.remove(tbl, i)
end
end
end
Expand Down

0 comments on commit 53465a8

Please sign in to comment.