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

fix pushing 0 bits

This commit is contained in:
Robin Appelman 2021-07-19 18:53:08 +02:00
commit 39e0f528fb

View file

@ -83,7 +83,9 @@ where
/// Push up to an usize worth of bits /// Push up to an usize worth of bits
fn push_bits(&mut self, bits: usize, count: usize) { fn push_bits(&mut self, bits: usize, count: usize) {
self.buffer.push_bits(bits, count) if count > 0 {
self.buffer.push_bits(bits, count)
}
} }
/// Write a boolean into the buffer /// Write a boolean into the buffer