Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

something in base58.go confused me #2

Closed
angelinazf opened this issue Sep 29, 2017 · 1 comment
Closed

something in base58.go confused me #2

angelinazf opened this issue Sep 29, 2017 · 1 comment

Comments

@angelinazf
Copy link

for b := range input {
       if b == 0x00 {
		result = append([]byte{b58Alphabet[0]}, result...)
	} else {
		break
	}
}

in this cycle, b is the index of input, not the value, so i think it may be wrong here.
it should be

for _, b := range input {
         ...
}

both in two functions this file(line26 & line42).

@Jeiwan
Copy link
Owner

Jeiwan commented Oct 6, 2017

@angelinazf You're right! Thank you! It's fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants