Skip to content

Commit

Permalink
Array out-of-bounds exception with bool filter, closes #1400.
Browse files Browse the repository at this point in the history
  • Loading branch information
kimchy committed Oct 15, 2011
1 parent b2769b1 commit 72ad722
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -72,12 +72,12 @@ public static void and(FixedBitSet into, DocIdSet other) throws IOException {
}
} else {
if (other == null) {
into.clear(0, into.length() + 1);
into.clear(0, into.length());
} else {
// copied from OpenBitSetDISI#inPlaceAnd
DocIdSetIterator disi = other.iterator();
if (disi == null) {
into.clear(0, into.length() + 1);
into.clear(0, into.length());
} else {
int bitSetDoc = into.nextSetBit(0);
int disiDoc;
Expand All @@ -86,7 +86,7 @@ public static void and(FixedBitSet into, DocIdSet other) throws IOException {
bitSetDoc = into.nextSetBit(disiDoc + 1);
}
if (bitSetDoc != -1) {
into.clear(bitSetDoc, into.length() + 1);
into.clear(bitSetDoc, into.length());
}
}
}
Expand Down

0 comments on commit 72ad722

Please sign in to comment.