From af783aac59a5ad005b16f1d998f9ca510f8d85a0 Mon Sep 17 00:00:00 2001 From: zach pratt Date: Wed, 23 Nov 2016 12:26:55 -0600 Subject: [PATCH] Apply the proposed change from @MikeMcl to fix an issue on old ipads Fixes https://github.com/MikeMcl/bignumber.js/issues/102 --- bignumber.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bignumber.js b/bignumber.js index a9aad66..7650534 100644 --- a/bignumber.js +++ b/bignumber.js @@ -1859,7 +1859,7 @@ // Only start adding at yc.length - 1 as the further digits of xc can be ignored. for ( a = 0; b; ) { a = ( xc[--b] = xc[b] + yc[b] + a ) / BASE | 0; - xc[b] %= BASE; + xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE; } if (a) {