Skip to content

Commit

Permalink
Merge pull request #27 from dated/zero-division-fix
Browse files Browse the repository at this point in the history
fixes zero division error in updateStakingIcon()
  • Loading branch information
locohammerhead authored May 25, 2018
2 parents b70f2ed + 2ea353d commit 058842f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Audiocoin-Qt.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TEMPLATE = app
TARGET = audiocoin-qt
VERSION = 1.2.2
VERSION = 1.3.1
INCLUDEPATH += src src/json src/qt
QT += network
QT += svg
Expand Down
4 changes: 2 additions & 2 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1082,10 +1082,10 @@ void BitcoinGUI::updateWeight()
void BitcoinGUI::updateStakingIcon()
{
updateWeight();
uint64_t nWeight = this->nWeight / COIN;

if (nLastCoinStakeSearchInterval && nWeight)
if (nLastCoinStakeSearchInterval && nWeight > 0)
{
uint64_t nWeight = this->nWeight / COIN;
uint64_t nNetworkWeight = GetPoSKernelPS();
double nEstimateTime = GetTargetSpacing(nBestHeight) * nNetworkWeight / nWeight;

Expand Down

0 comments on commit 058842f

Please sign in to comment.