Browse Source

Improve readability of DecodeBase58Check(...)

0.16
practicalswift 7 years ago
parent
commit
c6a995e7e5
  1. 2
      src/base58.cpp

2
src/base58.cpp

@ -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 // re-calculate the checksum, ensure it matches the included 4-byte checksum
uint256 hash = Hash(vchRet.begin(), vchRet.end() - 4); 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(); vchRet.clear();
return false; return false;
} }

Loading…
Cancel
Save