summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/src/libc/fmt/fltfmt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/src/libc/fmt/fltfmt.c b/sys/src/libc/fmt/fltfmt.c
index ff5462910..a00a6b14a 100644
--- a/sys/src/libc/fmt/fltfmt.c
+++ b/sys/src/libc/fmt/fltfmt.c
@@ -187,6 +187,8 @@ found:
* c3 digits of trailing '0'
* c4 digits after '.'
*/
+ if(chr == 'g') /* Significant figures. */
+ prec--;
c1 = 0;
c2 = prec + 1;
c3 = 0;