@gaialabs/core 0.1.13 → 0.1.14

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/dist/index.js CHANGED
@@ -2671,11 +2671,15 @@ var RomWriter = class {
2671
2671
  }
2672
2672
  writeChecksum() {
2673
2673
  const buf = this.outBuffer;
2674
+ buf[65500] = 255;
2675
+ buf[65501] = 255;
2676
+ buf[65502] = 0;
2677
+ buf[65503] = 0;
2674
2678
  let sum = 0;
2675
- for (let i = 0; i < buf.length; i++) sum += buf[i] & 255;
2679
+ for (let i = 0; i < buf.length; i++) sum += buf[i];
2676
2680
  buf[65502] = sum & 255;
2677
2681
  buf[65503] = sum >> 8 & 255;
2678
- const comp = ~sum & 65535;
2682
+ const comp = ~sum;
2679
2683
  buf[65500] = comp & 255;
2680
2684
  buf[65501] = comp >> 8 & 255;
2681
2685
  }