Skip to content

Commit

Permalink
ALS-5981: Fix off by one error in sparse mask creation
Browse files Browse the repository at this point in the history
  • Loading branch information
ramari16 committed Mar 25, 2024
1 parent b0699f1 commit a9afcd4
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ private VariantMask variantMaskFromRawString(String maskStringRaw) {
variantMask = new VariantMaskBitmaskImpl(bitmask);
} else {
Set<Integer> patientIndexes = new HashSet<>();
for(int i = 2; i < bitmask.bitLength() - 2; i++) {
if (bitmask.testBit(i)) {
for(int i = 0; i < bitmask.bitLength() - 4; i++) {
// i + 2 because the mask is padded with 2 bits on each end
if (bitmask.testBit(i + 2)) {
patientIndexes.add(i);
}
}
Expand Down

0 comments on commit a9afcd4

Please sign in to comment.