浏览代码

Simplified while loop in FromBase58 to match ToBase58

bwhitn 6 年之前
父节点
当前提交
a3c5b1e107
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      src/core/operations/FromBase58.mjs

+ 1 - 2
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();