From c6a995e7e5e6ae37dc1684f6060038e96864e947 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Thu, 24 Aug 2017 09:19:00 +0200 Subject: [PATCH] Improve readability of DecodeBase58Check(...) --- src/base58.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base58.cpp b/src/base58.cpp index 3802f953f..56acf392c 100644 --- a/src/base58.cpp +++ b/src/base58.cpp @@ -136,7 +136,7 @@ bool DecodeBase58Check(const char* psz, std::vector& 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; } -- 2.11.4.GIT