Skip to content

Commit 0251281

Browse files
committed
Fixed splice not deleting in the correct order
1 parent 87507f7 commit 0251281

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dist/lualib/typescript.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function TS_splice(list, startI, deleteCount, ...)
4747
deleteCount = #list - startI
4848
end
4949
local out = {}
50-
for i = startI, deleteCount do
50+
for i = startI + deleteCount, startI, -1 do
5151
table.insert(out, table.remove(list, i))
5252
end
5353
for _, value in ipairs({...}) do

0 commit comments

Comments
 (0)