diff --git a/base58.go b/base58.go index 5db078e..60b01e8 100644 --- a/base58.go +++ b/base58.go @@ -40,8 +40,10 @@ func Base58Decode(input []byte) []byte { zeroBytes := 0 for _, b := range input { - if b == 0x00 { + if b == b58Alphabet[0] { zeroBytes++ + } else { + break } }