aboutsummaryrefslogtreecommitdiff
path: root/src/rpcclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpcclient.cpp')
-rw-r--r--src/rpcclient.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index bedf9ffbcb..aa6d1eff59 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -146,8 +146,9 @@ Array RPCConvertValues(const std::string &strMethod, const std::vector<std::stri
jVal.setBool(false);
else
{
- if (!jVal.read(strVal))
- throw runtime_error(string("Error parsing JSON:")+strVal);
+ if (!jVal.read(strVal) || (jVal.isNull() && strVal.size() > 0))
+ if(!jVal.setNumStr(strVal) || jVal.isNull())
+ throw runtime_error(string("Error parsing JSON:")+strVal);
}
params.push_back(jVal);
}