Commit 13676ef11ac04cbee308c0c6eb388a4a5271e8d6

Con Kolivas 2012-10-12T18:00:14

Left align values that are suffix_string generated.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/cgminer.c b/cgminer.c
index 31ebf42..b55aed9 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -1518,7 +1518,7 @@ static void suffix_string(uint64_t val, char *buf, int sigdigits)
 	if (!sigdigits)
 		sprintf(buf, "%d%s", (unsigned int)dval, suffix);
 	else
-		sprintf(buf, "%.*g%s", sigdigits, dval, suffix);
+		sprintf(buf, "%-*.*g%s", sigdigits + 1, sigdigits, dval, suffix);
 }
 
 static void get_statline(char *buf, struct cgpu_info *cgpu)