diff --git a/src/cc/CCtx.cpp b/src/cc/CCtx.cpp index 9315faa9a..27d796ba0 100644 --- a/src/cc/CCtx.cpp +++ b/src/cc/CCtx.cpp @@ -69,8 +69,8 @@ std::string FinalizeCCTx(uint64_t CCmask,struct CCcontract_info *cp,CMutableTran { if ( GetTransaction(mtx.vin[i].prevout.hash,vintx,hashBlock,false) != 0 ) { - if ( vintx.vout[utxovout].scriptPubKey.IsPayToCryptoCondition() == 0 ) - if (ccvins==0) normalvins++; + if ( vintx.vout[mtx.vin[i].prevout.n].scriptPubKey.IsPayToCryptoCondition() == 0 && ccvins==0) + normalvins++; else ccvins++; } }