Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unexpected Slice with LowerBound=1[BUG] #22

Open
wanghan519 opened this issue Sep 22, 2023 · 0 comments
Open

unexpected Slice with LowerBound=1[BUG] #22

wanghan519 opened this issue Sep 22, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@wanghan519
Copy link

wanghan519 commented Sep 22, 2023

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 wanghan519 added the bug Something isn't working label Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants