Skip to content

Commit

Permalink
Improve readability of DecodeBase58Check(...)
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalswift committed Aug 24, 2017
1 parent affe927 commit c6a995e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/base58.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ bool DecodeBase58Check(const char* psz, std::vector<unsigned char>& vchRet)
}
// re-calculate the checksum, ensure it matches the included 4-byte checksum
uint256 hash = Hash(vchRet.begin(), vchRet.end() - 4);
if (memcmp(&hash, &vchRet.end()[-4], 4) != 0) {
if (memcmp(&hash, &vchRet[vchRet.size() - 4], 4) != 0) {
vchRet.clear();
return false;
}
Expand Down

0 comments on commit c6a995e

Please sign in to comment.