Skip to content

Commit

Permalink
fix: Wrong order for dichotomic comparison
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Sep 13, 2022
1 parent 3a6dcfe commit 83212e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/crud/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func dichotomicFind(items []absto.Item, id string) absto.Item {
return item
}

if item.ID < id {
if id < item.ID {
max = current - 1
} else {
min = current + 1
Expand Down

0 comments on commit 83212e8

Please sign in to comment.