diff options
author | Jeremy Rubin <jeremy.l.rubin@gmail.com> | 2017-02-19 13:46:19 -0500 |
---|---|---|
committer | Jeremy Rubin <jeremy.l.rubin@gmail.com> | 2017-07-08 13:33:01 -0700 |
commit | e19db7b5ad6af770d803e7120e21fba4b436e8be (patch) | |
tree | b8c99ded85cfec145ae984dbe7774eae9feb55ca /src | |
parent | bc2e7fd984bd669195bf330520f48f55faf81e88 (diff) |
Fix subscript[0] in utilstrencodings.cpp
Diffstat (limited to 'src')
-rw-r--r-- | src/utilstrencodings.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utilstrencodings.cpp b/src/utilstrencodings.cpp index 93abaec04b..feaf1a5e8b 100644 --- a/src/utilstrencodings.cpp +++ b/src/utilstrencodings.cpp @@ -228,7 +228,7 @@ std::vector<unsigned char> DecodeBase64(const char* p, bool* pfInvalid) std::string DecodeBase64(const std::string& str) { std::vector<unsigned char> vchRet = DecodeBase64(str.c_str()); - return (vchRet.size() == 0) ? std::string() : std::string((const char*)&vchRet[0], vchRet.size()); + return (vchRet.size() == 0) ? std::string() : std::string((const char*)vchRet.data(), vchRet.size()); } std::string EncodeBase32(const unsigned char* pch, size_t len) @@ -415,7 +415,7 @@ std::vector<unsigned char> DecodeBase32(const char* p, bool* pfInvalid) std::string DecodeBase32(const std::string& str) { std::vector<unsigned char> vchRet = DecodeBase32(str.c_str()); - return (vchRet.size() == 0) ? std::string() : std::string((const char*)&vchRet[0], vchRet.size()); + return (vchRet.size() == 0) ? std::string() : std::string((const char*) vchRet.data(), vchRet.size()); } static bool ParsePrechecks(const std::string& str) |