diff options
author | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-11-21 21:09:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-21 21:09:11 +0100 |
commit | 010b1022edd85680716bd66a2f8a58e643116dd1 (patch) | |
tree | b06742517653a8977cb3ae7aad29e01b2d5ae2a9 /xmrstak/misc | |
parent | ed3e0f3de59278e055bda112413f2e6451ab5823 (diff) | |
parent | 760f5257b41bb50c72e402ea0949b846574cd35d (diff) | |
download | xmr-stak-010b1022edd85680716bd66a2f8a58e643116dd1.zip xmr-stak-010b1022edd85680716bd66a2f8a58e643116dd1.tar.gz |
Merge pull request #178 from neversay/master
Fix indent on hash rate report.
Diffstat (limited to 'xmrstak/misc')
-rw-r--r-- | xmrstak/misc/executor.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/xmrstak/misc/executor.cpp b/xmrstak/misc/executor.cpp index 676dac7..ca78c61 100644 --- a/xmrstak/misc/executor.cpp +++ b/xmrstak/misc/executor.cpp @@ -625,7 +625,10 @@ inline const char* hps_format(double h, char* buf, size_t l) { if(std::isnormal(h) || h == 0.0) { - snprintf(buf, l, " %03.1f", h); + if(h < 10.0) + snprintf(buf, l, " %03.1f", h); + else + snprintf(buf, l, " %04.1f", h); return buf; } else @@ -723,9 +726,9 @@ void executor::hashrate_report(std::string& out) std::transform(name.begin(), name.end(), name.begin(), ::toupper); out.append("HASHRATE REPORT - ").append(name).append("\n"); - out.append("| ID | 10s | 60s | 15m |"); + out.append("| ID | 10s | 60s | 15m |"); if(nthd != 1) - out.append(" ID | 10s | 60s | 15m |\n"); + out.append(" ID | 10s | 60s | 15m |\n"); else out.append(1, '\n'); |