bson 6.7.0 → 6.7.1

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/lib/bson.mjs CHANGED
@@ -2228,9 +2228,15 @@ const NumberUtils = {
2228
2228
  source[offset] * 16777216);
2229
2229
  },
2230
2230
  getBigInt64LE(source, offset) {
2231
- const lo = NumberUtils.getUint32LE(source, offset);
2232
- const hi = NumberUtils.getUint32LE(source, offset + 4);
2233
- return (BigInt(hi) << BigInt(32)) + BigInt(lo);
2231
+ const hi = BigInt(source[offset + 4] +
2232
+ source[offset + 5] * 256 +
2233
+ source[offset + 6] * 65536 +
2234
+ (source[offset + 7] << 24));
2235
+ const lo = BigInt(source[offset] +
2236
+ source[offset + 1] * 256 +
2237
+ source[offset + 2] * 65536 +
2238
+ source[offset + 3] * 16777216);
2239
+ return (hi << BigInt(32)) + lo;
2234
2240
  },
2235
2241
  getFloat64LE: isBigEndian
2236
2242
  ? (source, offset) => {