From 61e193953fa380ccb41fb22c786d80972e987a8d Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 2 Apr 2019 01:33:28 -1100 Subject: [PATCH] Cross copy --- src/rpc/blockchain.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index a748e63c4..c1eb1bac6 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1203,7 +1203,7 @@ UniValue prices(const UniValue& params, bool fHelp) throw JSONRPCError(RPC_INVALID_PARAMETER, "illegal numpricefeeds"); prices = (uint32_t *)calloc(sizeof(*prices),width*numpricefeeds); correlated = (int64_t *)calloc(sizeof(*correlated),width); - for (ht=nextheight-1,i=0; i2*daywindow+2; i++,ht--) + for (ht=nextheight-1,i=0; i2*daywindow+2; i++,ht--) { if ( ht < 0 || ht > chainActive.Height() ) throw JSONRPCError(RPC_INVALID_PARAMETER, "Block height out of range"); @@ -1215,8 +1215,12 @@ UniValue prices(const UniValue& params, bool fHelp) throw JSONRPCError(RPC_INVALID_PARAMETER, "numprices != first numprices"); else { - for (j=0; j