Skip to content

Commit

Permalink
fix for #242
Browse files Browse the repository at this point in the history
  • Loading branch information
peterolson committed Nov 21, 2023
1 parent ec81062 commit 3892895
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions BigInteger.js
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,7 @@ var bigInt = (function (undefined) {

BigInteger.prototype.toString = function (radix, alphabet) {
if (radix === undefined) radix = 10;
if (radix !== 10) return toBaseString(this, radix, alphabet);
if (radix !== 10 || alphabet) return toBaseString(this, radix, alphabet);
var v = this.value, l = v.length, str = String(v[--l]), zeros = "0000000", digit;
while (--l >= 0) {
digit = String(v[l]);
Expand All @@ -1331,7 +1331,7 @@ var bigInt = (function (undefined) {

SmallInteger.prototype.toString = function (radix, alphabet) {
if (radix === undefined) radix = 10;
if (radix != 10) return toBaseString(this, radix, alphabet);
if (radix != 10 || alphabet) return toBaseString(this, radix, alphabet);
return String(this.value);
};

Expand Down
Loading

0 comments on commit 3892895

Please sign in to comment.