aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2017-08-24 09:19:00 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2017-08-24 09:19:40 +0200
commitc6a995e7e5e6ae37dc1684f6060038e96864e947 (patch)
tree703ce13f674552e44683ec73f3cc01bcdb69a6a5
parentaffe9271aa4953ddbceb1bfe4e60838570272c56 (diff)
Improve readability of DecodeBase58Check(...)
-rw-r--r--src/base58.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/base58.cpp b/src/base58.cpp
index 3802f953f9..56acf392ca 100644
--- a/src/base58.cpp
+++ b/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
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;
}