bn.js 4.12.2 → 4.12.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
@@ -2129,6 +2129,11 @@
2129
2129
  this.words[this.length - 1] &= mask;
2130
2130
  }
2131
2131
 
2132
+ if (this.length === 0) {
2133
+ this.words[0] = 0;
2134
+ this.length = 1;
2135
+ }
2136
+
2132
2137
  return this.strip();
2133
2138
  };
2134
2139
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bn.js",
3
- "version": "4.12.2",
3
+ "version": "4.12.3",
4
4
  "description": "Big number implementation in pure javascript",
5
5
  "main": "lib/bn.js",
6
6
  "scripts": {