brs-js 2.0.12 → 2.0.13

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brs-js",
3
- "version": "2.0.12",
3
+ "version": "2.0.13",
4
4
  "description": "Brickadia Save Read/Writing",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/utils.ts CHANGED
@@ -212,7 +212,7 @@ function write_string(str: string): Uint8Array {
212
212
  );
213
213
  } else {
214
214
  // ucs2 strings denoted by negative length
215
- const len = -((str.length + 1) * 2);
215
+ const len = -str.length;
216
216
  return concat(
217
217
  write_i32(len), // write length
218
218
  // convert string to little endian ucs2
@@ -220,8 +220,8 @@ function write_string(str: string): Uint8Array {
220
220
  str
221
221
  .split('')
222
222
  .flatMap(s => [s.charCodeAt(0) & 0xff, s.charCodeAt(0) >> 8])
223
- ),
224
- new Uint8Array([0]) // Null terminator
223
+ )
224
+ // new Uint8Array([0]) // Null terminator
225
225
  );
226
226
  }
227
227
  }