LUCENE-10311: avoid division by zero on small sets.

This commit is contained in:
Dawid Weiss 2022-03-09 11:41:01 +01:00
parent e5717cddfd
commit e999056c19
1 changed files with 1 additions and 1 deletions

View File

@ -204,7 +204,7 @@ public final class FixedBitSet extends BitSet {
final int rangeLength = 16;
final int interval = 1024;
if (numWords < interval) {
if (numWords <= interval) {
return cardinality();
}