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:
parent
5c4a085292
commit
2ed482879f
8 changed files with 164 additions and 25 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue