The added test shows the bad behavior: when calling Lapper::merge_overlaps(), because the max_len was not updated, Lapper::find() could miss results.
This PR adds a failing test, fixes the code to make it pass, and adds a comment on how lower_bound() works because it is part of the public API, but its semantics are non-obvious.
The added test shows the bad behavior: when calling
Lapper::merge_overlaps()
, because the max_len was not updated,Lapper::find()
could miss results.This PR adds a failing test, fixes the code to make it pass, and adds a comment on how
lower_bound()
works because it is part of the public API, but its semantics are non-obvious.