bn.js 5.2.2 → 5.2.3

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.
Files changed (2) hide show
  1. package/lib/bn.js +5 -0
  2. package/package.json +1 -1
package/lib/bn.js CHANGED
@@ -2216,6 +2216,11 @@
2216
2216
  this.words[this.length - 1] &= mask;
2217
2217
  }
2218
2218
 
2219
+ if (this.length === 0) {
2220
+ this.words[0] = 0;
2221
+ this.length = 1;
2222
+ }
2223
+
2219
2224
  return this._strip();
2220
2225
  };
2221
2226
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bn.js",
3
- "version": "5.2.2",
3
+ "version": "5.2.3",
4
4
  "description": "Big number implementation in pure javascript",
5
5
  "keywords": [
6
6
  "BN",