From 95d41e8ff4fb5a282e7cf55c4fa82eeb1950eb63 Mon Sep 17 00:00:00 2001 From: ppatience0 Date: Sun, 3 Mar 2013 14:12:33 -0500 Subject: fltfmt: make %g print decimal numbers less than 1 with a leading zero --- sys/src/libc/fmt/fltfmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } -- cgit v1.2.3