fix add on dataview missing byteOffset from previous dv

This commit is contained in:
DavidVentura
2024-01-28 20:14:41 +01:00
parent 7d0b9260eb
commit 95671dff0f
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
DataView.prototype.add = function (offset) {
return new DataView(this.buffer, offset);
return new DataView(this.buffer, offset + this.byteOffset);
};
DataView.prototype.writeU8 = function (val) {
return this.setUint8(0, val);