ref[JS]: js protocol

This commit is contained in:
godotg
2024-07-15 17:22:00 +08:00
parent b160d13129
commit 0b0b337eca
5 changed files with 20 additions and 20 deletions
@@ -100,7 +100,7 @@ const ByteBuffer = function() {
if (writeIndex > this.buffer.byteLength) {
throw new Error('writeIndex out of bounds exception: readOffset: ' + this.readOffset +
', writeOffset: ' + this.writeOffset +
'(expected: 0 <= readOffset <= writeOffset <= capacity:' + this.buffer.byteLength);
'(expected: 0 <= readOffset <= writeOffset <= capacity:' + this.buffer.byteLength) + ')';
}
this.writeOffset = writeIndex;
};
@@ -113,7 +113,7 @@ const ByteBuffer = function() {
if (readIndex > this.writeOffset) {
throw new Error('readIndex out of bounds exception: readOffset: ' + this.readOffset +
', writeOffset: ' + this.writeOffset +
'(expected: 0 <= readOffset <= writeOffset <= capacity:' + this.buffer.byteLength);
'(expected: 0 <= readOffset <= writeOffset <= capacity:' + this.buffer.byteLength) + ')';
}
this.readOffset = readIndex;
};