Skip to content

Commit

Permalink
fix(unionlabs): little-endian bitvector
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-aitlahcen committed Dec 12, 2024
1 parent fbe771b commit ce8cf98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/unionlabs/src/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl<'a> BytesBitIterator<'a> {
// debug_assert_eq!(self.hash_bytes.len(), Hash::LENGTH); // invariant
// debug_assert_lt!(index, Hash::LENGTH_IN_BITS); // assumed precondition
let pos = index / 8;
let bit = 7 - index % 8;
let bit = index % 8;
(self.bz[pos] >> bit) & 1 != 0
}
}
Expand Down

0 comments on commit ce8cf98

Please sign in to comment.