VBA-Better-Array icon indicating copy to clipboard operation
VBA-Better-Array copied to clipboard

unexpected Slice with LowerBound=1[BUG]

Open wanghan519 opened this issue 2 years ago • 0 comments

Describe the bug

    Dim arr As BetterArray
    Set arr = New BetterArray
    arr.LowerBound = 1
    arr.Items = Array(1, 2, 3)
    Debug.Print arr.Slice(4)(1)

output 3

Expected behavior arr.Slice(4) should be empty

I made a modification on line 661, but I'm uncertain if there are any side effects. OldIndex = Min(RelativeStart, LocalLength + LBound(LocalItems))

Thank you for your great work!

wanghan519 avatar Sep 22 '23 20:09 wanghan519