diff --git a/iguana/exchanges/LP_transaction.c b/iguana/exchanges/LP_transaction.c index c563e1ee5..5d33f1ecf 100644 --- a/iguana/exchanges/LP_transaction.c +++ b/iguana/exchanges/LP_transaction.c @@ -1333,6 +1333,7 @@ char *LP_withdraw(struct iguana_info *coin,cJSON *argjson) privkeys = cJSON_CreateArray(); vins = cJSON_CreateArray(); memset(V,0,sizeof(*V) * maxV); + numvins = 0; if ( (rawtx= LP_createrawtransaction(&txobj,&numvins,coin,V,maxV,privkey,outputs,vins,privkeys,iter == 0 ? txfee : newtxfee,utxotxid,utxovout,locktime)) != 0 ) { completed = 0; @@ -1371,7 +1372,18 @@ char *LP_withdraw(struct iguana_info *coin,cJSON *argjson) } free(V); if ( vins != 0 ) + { + if ( (numvins= cJSON_GetArraySize(vins)) > 0 ) + { + + for (i=0; i