1
0
Fork 0
mirror of https://codeberg.org/icewind/bitbuffer.git synced 2026-06-03 08:34:07 +02:00

more write fixes

This commit is contained in:
Robin Appelman 2021-07-12 20:19:09 +02:00
commit f873005046

View file

@ -103,7 +103,7 @@ where
debug_assert!(count < USIZE_BITS - 8);
// ensure there are no stray bits
let bits = bits & (usize::MAX >> count);
let bits = bits & (usize::MAX >> (USIZE_BITS - count));
let bit_offset = self.bit_len & 7;
let last_written_byte = if bit_offset > 0 {