diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 0671c6ae6..ffacec568 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2338,7 +2338,7 @@ static void ApproximateBestSubset(vector vCoins,set >& setCoinsRet, CAmount& nValueRet, uint64_t *interestp) const { - uint64_t interests[1024],lowest_interest = 0; int32_t count = 0; + uint64_t interests[8192],lowest_interest = 0; int32_t count = 0; setCoinsRet.clear(); memset(interests,0,sizeof(interests)); nValueRet = 0; @@ -2448,7 +2448,7 @@ bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int LogPrint("selectcoins", "SelectCoins() best subset: "); for (unsigned int i = 0; i < vValue.size(); i++) if (vfBest[i]) - LogPrint("selectcoins", "%s + %s, ", FormatMoney(vValue[i].first),FormatMoney(interests[i])); + LogPrint("selectcoins", "%s + %s, ", FormatMoney(vValue[i].first),FormatMoney(i < count ? interests[i] : 0)); LogPrint("selectcoins", "total %s\n", FormatMoney(nBest)); }