From a9d438f6b5045e68252d0fcce41498d320670ca4 Mon Sep 17 00:00:00 2001 From: herroworrd <47008367+herroworrd@users.noreply.github.com> Date: Fri, 6 Dec 2024 20:27:27 +0000 Subject: [PATCH] Fix length when splicing new items Added length increment when adding items using the splice method. --- src/BetterArray.cls | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/BetterArray.cls b/src/BetterArray.cls index 7704af5..91ea828 100644 --- a/src/BetterArray.cls +++ b/src/BetterArray.cls @@ -1230,8 +1230,10 @@ Attribute Splice.VB_Description = "changes the contents of the array by removing i = ActualStart Dim j As Long For j = LBound(TempItems) To UBound(TempItems) + EnsureCapacity This.Length + 1 LocalItems(i) = TempItems(j) inc i + inc This.Length Next End If