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:
Christian Ebner 2019-12-17 14:10:40 +01:00 committed by Dietmar Maurer
parent 38d9a69875
commit 48f6d67764
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}