mirror of
https://github.com/codedread/bitjs
synced 2025-10-04 01:59:15 +02:00
Beef up unit test coverage in io package.
This commit is contained in:
parent
5c4a085292
commit
2ed482879f
8 changed files with 164 additions and 25 deletions
|
@ -84,13 +84,13 @@ export class BitBuffer {
|
|||
if (this.bytePtr >= this.data.byteLength) {
|
||||
throw `No more bytes left when switching packing direction`;
|
||||
}
|
||||
this.bitPtr = 7;
|
||||
this.bitPtr = 0;
|
||||
} else if (!this.mtl && this.bitPtr !== 0) {
|
||||
this.bytePtr++;
|
||||
if (this.bytePtr >= this.data.byteLength) {
|
||||
throw `No more bytes left when switching packing direction`;
|
||||
}
|
||||
this.bitPtr = 0;
|
||||
this.bitPtr = 7;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue