@zaplier/sdk 1.0.6 → 1.0.7

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.cjs CHANGED
@@ -155,8 +155,12 @@ function x64hash128(input, seed = 0) {
155
155
  h1 = x64Add(h1, h2);
156
156
  h2 = x64Add(h2, h1);
157
157
  // Convert to hex string
158
- const hex1 = h1[0].toString(16).padStart(8, "0") + h1[1].toString(16).padStart(8, "0");
159
- const hex2 = h2[0].toString(16).padStart(8, "0") + h2[1].toString(16).padStart(8, "0");
158
+ // CRITICAL: Use >>> 0 to convert to unsigned 32-bit integer before converting to hex
159
+ // This prevents negative numbers from generating hashes with minus signs (e.g., "-6b43973f")
160
+ const hex1 = (h1[0] >>> 0).toString(16).padStart(8, "0") +
161
+ (h1[1] >>> 0).toString(16).padStart(8, "0");
162
+ const hex2 = (h2[0] >>> 0).toString(16).padStart(8, "0") +
163
+ (h2[1] >>> 0).toString(16).padStart(8, "0");
160
164
  return hex1 + hex2;
161
165
  }
162
166
  /**