diff --git a/src/cc/dice.cpp b/src/cc/dice.cpp index ab2a27a34..459cd28a1 100644 --- a/src/cc/dice.cpp +++ b/src/cc/dice.cpp @@ -683,7 +683,7 @@ int64_t DicePlanFunds(uint64_t &entropyval,uint256 &entropytxid,uint64_t refsbit entropyval = 0; int loops = 0; if (random) { - int startfrom = rand()%((unspentOutputs.size()\2)-1 + 1) + 1; + int startfrom = rand()%((unspentOutputs.size()%2)-1 + 1) + 1; fprintf(stderr, "start from loop: %d\n",startfrom); } for (std::vector >::const_iterator it=unspentOutputs.begin(); it!=unspentOutputs.end(); it++)