changeset 29653:2e8c6d74f0aa

rpc: cast indexes to ints
author Braydon Fuller <courier@braydon.com>
date Thu, 07 Apr 2016 13:52:40 -0400
parents 3c1016e2fb1d
children 034b7814ab95
files src/rpcmisc.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/rpcmisc.cpp	Thu Apr 07 12:35:25 2016 -0400
+++ b/src/rpcmisc.cpp	Thu Apr 07 13:52:40 2016 -0400
@@ -534,7 +534,7 @@
 
         output.push_back(Pair("address", address));
         output.push_back(Pair("txid", it->first.txhash.GetHex()));
-        output.push_back(Pair("outputIndex", it->first.index));
+        output.push_back(Pair("outputIndex", (int)it->first.index));
         output.push_back(Pair("script", HexStr(it->second.script.begin(), it->second.script.end())));
         output.push_back(Pair("satoshis", it->second.satoshis));
         output.push_back(Pair("height", it->second.blockHeight));
@@ -594,7 +594,7 @@
         UniValue delta(UniValue::VOBJ);
         delta.push_back(Pair("satoshis", it->second));
         delta.push_back(Pair("txid", it->first.txhash.GetHex()));
-        delta.push_back(Pair("index", it->first.index));
+        delta.push_back(Pair("index", (int)it->first.index));
         delta.push_back(Pair("height", it->first.blockHeight));
         delta.push_back(Pair("hash", it->first.hashBytes.GetHex()));
         delta.push_back(Pair("type", (int)it->first.type));