Fix ranging in Base58Encode and Base58Decode

This commit is contained in:
Ivan Kuznetsov 2017-10-06 17:42:49 +07:00
parent 58f9eb7dc5
commit cb32e7ca13
1 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ func Base58Encode(input []byte) []byte {
}
ReverseBytes(result)
for b := range input {
for _, b := range input {
if b == 0x00 {
result = append([]byte{b58Alphabet[0]}, result...)
} else {
@ -39,7 +39,7 @@ func Base58Decode(input []byte) []byte {
result := big.NewInt(0)
zeroBytes := 0
for b := range input {
for _, b := range input {
if b == 0x00 {
zeroBytes++
}