diff --git a/src/komodo.h b/src/komodo.h index c564775bf..ef0438070 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -57,12 +57,12 @@ int32_t iguana_rwbignum(int32_t rwflag,uint8_t *serialized,int32_t len,uint8_t * if ( rwflag == 0 ) { for (i=0; iGetCoins(hash,coins) == 0 ) - return(0); - if ( n < 0 || (unsigned int)n >= coins.vout.size() || coins.vout[n].IsNull() ) + { + printf("null pcoinsTip->GetCoins\n"); return(0); + } + if ( n < 0 || (unsigned int)n >= coins.vout.size() ) + { + printf("komodo_getspendscript illegal n.%d size.%d\n",n,coins.vout.size()); + return(0); + } BlockMap::iterator it = mapBlockIndex.find(pcoinsTip->GetBestBlock()); pindex = it->second; return((char *)coins.vout[n].scriptPubKey.ToString().c_str());