1
0
Fork 0
mirror of https://github.com/codedread/bitjs synced 2025-10-03 17:49:16 +02:00

Beef up unit test coverage in io package.

This commit is contained in:
Jeff Schiller 2023-11-20 22:44:41 -08:00
parent 5c4a085292
commit 2ed482879f
8 changed files with 164 additions and 25 deletions

View file

@ -114,7 +114,7 @@ export class ByteBuffer {
writeASCIIString(str) {
for (let i = 0; i < str.length; ++i) {
const curByte = str.charCodeAt(i);
if (curByte < 0 || curByte > 255) {
if (curByte < 0 || curByte > 127) {
throw 'Trying to write a non-ASCII string!';
}
this.insertByte(curByte);