diff options
| -rw-r--r-- | sys/src/libc/fmt/fltfmt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/libc/fmt/fltfmt.c b/sys/src/libc/fmt/fltfmt.c index 84bd0c91c..aed8d9518 100644 --- a/sys/src/libc/fmt/fltfmt.c +++ b/sys/src/libc/fmt/fltfmt.c @@ -187,7 +187,7 @@ found: * c3 digits of trailing '0' * c4 digits after '.' */ - if(chr == 'g') /* Significant figures. */ + if(chr == 'g' && prec > 0) /* Significant figures. */ prec--; c1 = 0; c2 = prec + 1; |
