mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01:00
Use prefix operator in for loop of DecodeBase58.
This commit is contained in:
@@ -42,7 +42,7 @@ bool DecodeBase58(const char* psz, std::vector<unsigned char>& vch)
|
|||||||
// Apply "b256 = b256 * 58 + ch".
|
// Apply "b256 = b256 * 58 + ch".
|
||||||
int carry = ch - pszBase58;
|
int carry = ch - pszBase58;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (std::vector<unsigned char>::reverse_iterator it = b256.rbegin(); (carry != 0 || i < length) && (it != b256.rend()); it++, i++) {
|
for (std::vector<unsigned char>::reverse_iterator it = b256.rbegin(); (carry != 0 || i < length) && (it != b256.rend()); ++it, ++i) {
|
||||||
carry += 58 * (*it);
|
carry += 58 * (*it);
|
||||||
*it = carry % 256;
|
*it = carry % 256;
|
||||||
carry /= 256;
|
carry /= 256;
|
||||||
|
|||||||
Reference in New Issue
Block a user