Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix wrong value lookup in BigNestedIntArray

  • Loading branch information...
commit 76e6ea80fe1ce989beee510a9a4a2a08b5160645 1 parent c1604b5
Dmytro Ivchenko authored
4 bobo-browse/src/main/java/com/browseengine/bobo/util/BigNestedIntArray.java
View
@@ -685,7 +685,7 @@ public final boolean containsValueInRangeShift(int id, int value, int startValue
final int[] page = _list[id >> PAGEID_SHIFT];
if(page == null) return false;
- final int val = page[id & SLOTID_MASK];
+ int val = page[id & SLOTID_MASK];
if (val >= 0)
{
int shiftedVal = val >> shift;
@@ -701,13 +701,13 @@ else if(val != MISSING)
int end = idx + (val & COUNT_MASK);
while(idx < end)
{
+ val = page[idx++];
int shiftedVal = val >> shift;
if(shiftedVal >= startValue && shiftedVal < endValue)
{
if(value < 0 || (val & mask) == value)
return true;
}
- idx++;
}
}
return false;
Please sign in to comment.
Something went wrong with that request. Please try again.