1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-23 04:54:26 +00:00

Use 3 significant digits when suffix string is used and values are >1000.

This commit is contained in:
ckolivas 2012-10-17 10:33:22 +11:00
parent 68f9af28f2
commit 3fce32f494

View File

@ -1504,7 +1504,7 @@ static void suffix_string(uint64_t val, char *buf, int sigdigits)
if (!sigdigits) { if (!sigdigits) {
if (decimal) if (decimal)
sprintf(buf, "%.1f%s", dval, suffix); sprintf(buf, "%.3g%s", dval, suffix);
else else
sprintf(buf, "%d%s", (unsigned int)dval, suffix); sprintf(buf, "%d%s", (unsigned int)dval, suffix);
} else { } else {