Update base58.go

This commit is contained in:
Jeep Sun 2017-11-24 16:00:05 +08:00 committed by GitHub
parent 0f48bba1df
commit 4ac3360f05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -39,9 +39,11 @@ func Base58Decode(input []byte) []byte {
result := big.NewInt(0)
zeroBytes := 0
for b := range input {
if b == 0x00 {
for _, b := range input {
if b == b58Alphabet[0] {
zeroBytes++
} else {
break
}
}