From d755fb1b807537cc02961ef20b8a3541c294eacd Mon Sep 17 00:00:00 2001 From: Steven Nicolaou Date: Fri, 1 Feb 2019 18:27:24 +0200 Subject: [PATCH] Correct FP rounding errors --- src/whoosh/matching/binary.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/whoosh/matching/binary.py b/src/whoosh/matching/binary.py index d2aff26e..bd23af45 100644 --- a/src/whoosh/matching/binary.py +++ b/src/whoosh/matching/binary.py @@ -395,11 +395,11 @@ def skip_to_quality(self, minquality): skipped = 0 aq = a.block_quality() bq = b.block_quality() - while a.is_active() and b.is_active() and max(aq, bq) <= minquality: - if aq <= minquality: + while a.is_active() and b.is_active() and max(aq, bq) < minquality: + if aq < minquality: skipped += a.skip_to_quality(minquality) aq = a.block_quality() - if bq <= minquality: + if bq < minquality: skipped += b.skip_to_quality(minquality) bq = b.block_quality() return skipped