Comparing version 0.1.4 to 0.1.5
@@ -619,4 +619,6 @@ var assert = require('assert'); | ||
} | ||
max.ishr(1, shift); | ||
shift -= 1; | ||
var delta = Math.max(1, maxLen - c.bitLength()); | ||
max.ishr(delta, shift); | ||
maxLen -= delta; | ||
shift -= delta; | ||
} | ||
@@ -718,4 +720,4 @@ return { mod: c, div: r }; | ||
var carry = q; | ||
for (var i = s; carry != 0; i++) { | ||
var w = i < this.length ? this.words[i] : 0; | ||
for (var i = s; carry != 0 && i < this.length; i++) { | ||
var w = this.words[i]; | ||
w += carry; | ||
@@ -726,2 +728,4 @@ carry = w >> 24; | ||
} | ||
if (carry !== 0) | ||
this.words[i] = carry; | ||
this.length = this.words.length; | ||
@@ -728,0 +732,0 @@ return this; |
{ | ||
"name": "bn.js", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Big number implementation in pure javascript", | ||
@@ -5,0 +5,0 @@ "main": "lib/bn.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29790
956