mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-07-14 01:38:00 +07:00
Fixed issue where flush would write more bits than cached
This commit is contained in:
@ -58,7 +58,7 @@ public class BitOutput {
|
|||||||
assert bitsCached >= 0 : "bitsCached(" + bitsCached + ") < " + 0;
|
assert bitsCached >= 0 : "bitsCached(" + bitsCached + ") < " + 0;
|
||||||
assert bitsCached < Byte.SIZE : "bitsCached(" + bitsCached + ") > " + (Byte.SIZE - 1);
|
assert bitsCached < Byte.SIZE : "bitsCached(" + bitsCached + ") > " + (Byte.SIZE - 1);
|
||||||
if (bitsCached <= 0) return this;
|
if (bitsCached <= 0) return this;
|
||||||
byteOutput._write8(cache);
|
byteOutput._write8(cache & MASKS[bitsCached]);
|
||||||
clearCache();
|
clearCache();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user