diff --git a/src/base58.cpp b/src/base58.cpp index f9165ed55f7..cab99f0cb5d 100644 --- a/src/base58.cpp +++ b/src/base58.cpp @@ -139,7 +139,7 @@ std::string EncodeBase58Check(Span input) // add 4-byte hash check to the end std::vector vch(input.begin(), input.end()); uint256 hash = Hash(vch); - vch.insert(vch.end(), (unsigned char*)&hash, (unsigned char*)&hash + 4); + vch.insert(vch.end(), hash.data(), hash.data() + 4); return EncodeBase58(vch); }