binary_search_tree: fix off by one error in search_binary_tree_by()
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
parent
38d9a69875
commit
48f6d67764
|
@ -140,7 +140,7 @@ pub fn search_binary_tree_by<F: Copy + Fn(usize) -> Ordering>(
|
|||
skip_multiples: usize,
|
||||
compare: F
|
||||
) -> Option<usize> {
|
||||
if start > size {
|
||||
if start >= size {
|
||||
return None;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue