diff --git a/src/komodo_nSPV.h b/src/komodo_nSPV.h index 98048e1fb..668482560 100644 --- a/src/komodo_nSPV.h +++ b/src/komodo_nSPV.h @@ -82,7 +82,7 @@ int32_t iguana_rwequihdrvec(int32_t rwflag,uint8_t *serialized,uint16_t *vecsize if ( (vsize= *vecsizep) != 0 ) { if ( *ptrp == 0 ) - *ptrp = calloc(sizeof(**ptrp),vsize); // relies on uint16_t being "small" to prevent mem exhaustion + *ptrp = (struct NSPV_equihdr *)calloc(sizeof(**ptrp),vsize); // relies on uint16_t being "small" to prevent mem exhaustion for (i=0; inumutxos= (int32_t)unspentOutputs.size()) > 0 ) { tipheight = chainActive.LastTip()->GetHeight(); - ptr->utxos = calloc(ptr->numutxos,sizeof(*ptr->utxos)); + ptr->utxos = (struct NSPV_utxoresp *)calloc(ptr->numutxos,sizeof(*ptr->utxos)); for (std::vector >::const_iterator it=unspentOutputs.begin(); it!=unspentOutputs.end(); it++) { ptr->utxos[n].txid = it->first.txhash;