From a3c5b1e1071060ee025757281d8545549d922035 Mon Sep 17 00:00:00 2001 From: bwhitn Date: Sun, 28 Oct 2018 18:37:00 -0400 Subject: [PATCH] Simplified while loop in FromBase58 to match ToBase58 --- src/core/operations/FromBase58.mjs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/operations/FromBase58.mjs b/src/core/operations/FromBase58.mjs index 966a95be..8b0db19f 100644 --- a/src/core/operations/FromBase58.mjs +++ b/src/core/operations/FromBase58.mjs @@ -103,9 +103,8 @@ class FromBase58 extends Operation { } }); - while (zeroPrefix > 0) { + while (zeroPrefix--) { result.push(0); - zeroPrefix--; } return result.reverse();