From 89b72cbfc8eae946fde9c8ba873644de794134e3 Mon Sep 17 00:00:00 2001 From: Todd Gruben Date: Tue, 15 Aug 2017 12:33:19 -0500 Subject: [PATCH] provided some clarification of CountRange issue --- roaring/roaring.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roaring/roaring.go b/roaring/roaring.go index 065f4e6df..6fa53f472 100644 --- a/roaring/roaring.go +++ b/roaring/roaring.go @@ -234,6 +234,8 @@ func (b *Bitmap) CountRange(start, end uint64) (n uint64) { // Count containers in between. for x := i + 1; x < j; x++ { + // Ensure that current container is inside the requested range since + // keys to not have to be consecutive if ekey < b.keys[x] { break }