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

Found slice index can't be greater than the slice's length #31

Open
samoilenko opened this issue Nov 1, 2023 · 0 comments
Open

Found slice index can't be greater than the slice's length #31

samoilenko opened this issue Nov 1, 2023 · 0 comments

Comments

@samoilenko
Copy link

consistent/consistent.go

Lines 161 to 164 in 30ea17e

i = sort.Search(len(c.sortedHashes), f)
if i >= len(c.sortedHashes) {
i = 0
}

seems like i is never greater than len(c.sortedHashes)

 i = sort.Search(len(c.sortedHashes), f) 
 if i == len(c.sortedHashes) { 
 	i = 0 
 } 
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