ソースを参照

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();