Merge pull request #6562 from sellout/broken-cli-help
Fix zcash-cli crash when printing help message
This commit is contained in:
commit
0679ee64b9
|
@ -212,12 +212,12 @@ UniValue ConvertValues(const std::string &strMethod, const std::vector<std::stri
|
||||||
auto helpMsg = CallRPC("help", ConvertValues("help", {strMethod}));
|
auto helpMsg = CallRPC("help", ConvertValues("help", {strMethod}));
|
||||||
return "\n\n"
|
return "\n\n"
|
||||||
+ (helpMsg.has_value()
|
+ (helpMsg.has_value()
|
||||||
? strprintf(
|
? "Usage: " + helpMsg.value().get_str()
|
||||||
|
: strprintf(
|
||||||
"An error occurred while attempting to retrieve the "
|
"An error occurred while attempting to retrieve the "
|
||||||
"help text for %s: %s",
|
"help text for %s: %s",
|
||||||
strMethod,
|
strMethod,
|
||||||
helpMsg.error().get_str())
|
helpMsg.error().get_str()));
|
||||||
: helpMsg->get_str());
|
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue