@andrew_l/tl-pack 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -59,7 +59,7 @@ export class BinaryReader {
59
59
  this._last = this.targetView.getInt8(this.offset);
60
60
  }
61
61
  else {
62
- this._last = this.targetView.getInt8(this.offset);
62
+ this._last = this.targetView.getUint8(this.offset);
63
63
  }
64
64
  this.offset += 1;
65
65
  return this._last;
@@ -111,7 +111,12 @@ export class BinaryWriter {
111
111
  }
112
112
  writeInt8(value, signed = true) {
113
113
  this.allocate(1);
114
- this.target[this.offset++] = value;
114
+ if (signed) {
115
+ this.target[this.offset++] = value;
116
+ }
117
+ else {
118
+ this.targetView.setUint8(this.offset++, value);
119
+ }
115
120
  }
116
121
  writeFloat(value) {
117
122
  this.allocate(4);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andrew_l/tl-pack",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "scripts": {