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

deleteSegment will not delete first segment #120

Open
Fuzzyma opened this issue Dec 20, 2022 · 0 comments
Open

deleteSegment will not delete first segment #120

Fuzzyma opened this issue Dec 20, 2022 · 0 comments

Comments

@Fuzzyma
Copy link

Fuzzyma commented Dec 20, 2022

the check in deleteSegment checks for numSegments > 1 and is later used to index this.segments. So this check effictively means that 0 and 1 are not allowed as index. However, index 1 should be allowed to remove the first segment.

So changing the check to numSegments > 0 or >= 1 would fix this big

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant