diff --git a/src/base58.h b/src/base58.h index 269950d1..e0ebbd9b 100644 --- a/src/base58.h +++ b/src/base58.h @@ -214,7 +214,9 @@ class CBase58Data { } std::string ToString() const { - std::vector vch(1, nVersion); + std::vector vch; + vch.resize(1, nVersion); + vch.shrink_to_fit(); vch.insert(vch.end(), vchData.begin(), vchData.end()); return EncodeBase58Check(vch); }