mirror of
https://codeberg.org/icewind/bitbuffer.git
synced 2026-06-03 16:44:06 +02:00
fix pushing 0 bits
This commit is contained in:
parent
6042fd5426
commit
39e0f528fb
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue