summaryrefslogtreecommitdiff
path: root/sys/src/libc
diff options
context:
space:
mode:
authorppatience0 <ppatience0@gmail.com>2013-03-03 14:12:33 -0500
committerppatience0 <ppatience0@gmail.com>2013-03-03 14:12:33 -0500
commit95d41e8ff4fb5a282e7cf55c4fa82eeb1950eb63 (patch)
treef42df79b8843876577fbb845bf11ec391430c434 /sys/src/libc
parent1a8884406906d6b9e6fddffb609efa8b924939e7 (diff)
fltfmt: make %g print decimal numbers less than 1 with a leading zero
Diffstat (limited to 'sys/src/libc')
-rw-r--r--sys/src/libc/fmt/fltfmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/libc/fmt/fltfmt.c b/sys/src/libc/fmt/fltfmt.c
index aed8d9518..267bcfbf7 100644
--- a/sys/src/libc/fmt/fltfmt.c
+++ b/sys/src/libc/fmt/fltfmt.c
@@ -205,7 +205,7 @@ found:
if(xadd(s1, c2, 5))
e++;
if(e >= -4 && e <= prec) {
- c1 = -e - 1;
+ c1 = -e;
c4 = prec - e;
chr = 'h'; // flag for 'f' style
}