Skip to content

Commit cb32e7c

Browse files
committed
Fix ranging in Base58Encode and Base58Decode
1 parent 58f9eb7 commit cb32e7c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

base58.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func Base58Encode(input []byte) []byte {
2323
}
2424

2525
ReverseBytes(result)
26-
for b := range input {
26+
for _, b := range input {
2727
if b == 0x00 {
2828
result = append([]byte{b58Alphabet[0]}, result...)
2929
} else {
@@ -39,7 +39,7 @@ func Base58Decode(input []byte) []byte {
3939
result := big.NewInt(0)
4040
zeroBytes := 0
4141

42-
for b := range input {
42+
for _, b := range input {
4343
if b == 0x00 {
4444
zeroBytes++
4545
}

0 commit comments

Comments
 (0)