ean 8 integration passes

This commit is contained in:
Henry Schimke
2022-12-09 18:15:52 -06:00
parent 0cd27d1ae3
commit 81f2298dd0
14 changed files with 1059 additions and 780 deletions

View File

@@ -137,7 +137,7 @@ impl BitArray {
return self.size;
}
let mut bitsOffset = from / 32;
let mut currentBits = !self.bits[bitsOffset] as i32;
let mut currentBits = !self.bits[bitsOffset] as i64;
// mask off lesser bits first
currentBits &= -(1 << (from & 0x1F));
while currentBits == 0 {
@@ -145,7 +145,7 @@ impl BitArray {
if bitsOffset == self.bits.len() {
return self.size;
}
currentBits = !self.bits[bitsOffset] as i32;
currentBits = !self.bits[bitsOffset] as i64;
}
let result = (bitsOffset * 32) + currentBits.trailing_zeros() as usize;
return cmp::min(result, self.size);