Merge 5728f88d64 into merged_master (Bitcoin PR #17280)

This commit is contained in:
Andrew Poelstra 2020-11-09 21:20:47 +00:00
commit 578080081e
6 changed files with 8 additions and 8 deletions

View file

@ -366,7 +366,7 @@ static UniValue CallRPC(BaseRequestHandler *rh, const std::string& strMethod, co
std::string endpoint = "/";
if (!gArgs.GetArgs("-rpcwallet").empty()) {
std::string walletName = gArgs.GetArg("-rpcwallet", "");
char *encodedURI = evhttp_uriencode(walletName.c_str(), walletName.size(), false);
char *encodedURI = evhttp_uriencode(walletName.data(), walletName.size(), false);
if (encodedURI) {
endpoint = "/wallet/"+ std::string(encodedURI);
free(encodedURI);