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