diff options
Diffstat (limited to 'xmrstak')
-rw-r--r-- | xmrstak/misc/executor.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xmrstak/misc/executor.cpp b/xmrstak/misc/executor.cpp index 680f045..6d06411 100644 --- a/xmrstak/misc/executor.cpp +++ b/xmrstak/misc/executor.cpp @@ -776,14 +776,14 @@ void executor::hashrate_report(std::string& out) out.append(hps_format(fHps[0], num, sizeof(num))).append(" |"); out.append(hps_format(fHps[1], num, sizeof(num))).append(" |"); out.append(hps_format(fHps[2], num, sizeof(num))).append(1, ' '); - - fTotal[0] += fHps[0]; - fTotal[1] += fHps[1]; - fTotal[2] += fHps[2]; - fTotalCur[0] += fHps[0]; - fTotalCur[1] += fHps[1]; - fTotalCur[2] += fHps[2]; + fTotal[0] += (std::isnormal(fHps[0])) ? fHps[0] : 0.0; + fTotal[0] += (std::isnormal(fHps[1])) ? fHps[1] : 0.0; + fTotal[0] += (std::isnormal(fHps[2])) ? fHps[2] : 0.0; + + fTotalCur[0] += (std::isnormal(fHps[0])) ? fHps[0] : 0.0; + fTotalCur[0] += (std::isnormal(fHps[1])) ? fHps[1] : 0.0; + fTotalCur[0] += (std::isnormal(fHps[2])) ? fHps[2] : 0.0; if((i & 0x1) == 1) //Odd i's out.append("|\n"); |