Skip to content

Commit

Permalink
Fix ranging in Base58Encode and Base58Decode
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeiwan committed Oct 6, 2017
1 parent 58f9eb7 commit cb32e7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base58.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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++
}
Expand Down

0 comments on commit cb32e7c

Please sign in to comment.