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

Fix slice for negative index #30

Merged
merged 1 commit into from
Aug 4, 2020
Merged

Fix slice for negative index #30

merged 1 commit into from
Aug 4, 2020

Conversation

acrrd
Copy link
Contributor

@acrrd acrrd commented Jul 24, 2020

This PR add 1 to the end index when a negative number that is less then -1 is used.

Close #29

@raskr
Copy link
Owner

raskr commented Aug 4, 2020

Thank you for the fix. (and what's worse I forgot to put a notice that end index is inclusive...)

@raskr raskr merged commit d3e6f7d into raskr:master Aug 4, 2020
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

Successfully merging this pull request may close these issues.

Negative index in slice are off by one
2 participants