mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Merge 7962c97a2e into merged_master (Bitcoin PR bitcoin-core/gui#446)
This commit is contained in:
commit
c79e6b2e90
1 changed files with 5 additions and 4 deletions
|
|
@ -247,10 +247,11 @@ bool RPCConsole::RPCParseCommandLine(interfaces::Node* node, std::string &strRes
|
|||
UniValue subelement;
|
||||
if (lastResult.isArray())
|
||||
{
|
||||
for(char argch: curarg)
|
||||
if (!IsDigit(argch))
|
||||
throw std::runtime_error("Invalid result query");
|
||||
subelement = lastResult[LocaleIndependentAtoi<int>(curarg)];
|
||||
const auto parsed{ToIntegral<size_t>(curarg)};
|
||||
if (!parsed) {
|
||||
throw std::runtime_error("Invalid result query");
|
||||
}
|
||||
subelement = lastResult[parsed.value()];
|
||||
}
|
||||
else if (lastResult.isObject())
|
||||
subelement = find_value(lastResult, curarg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue