From 3d908529e9f209be066b56be817f724a7b89d9c4 Mon Sep 17 00:00:00 2001 From: ppatience0 Date: Fri, 1 Mar 2013 17:23:26 -0500 Subject: [PATCH] fltfmt: fix %g not printing as %e in some cases when it should --- 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 a00a6b14a..84bd0c91c 100644 --- a/sys/src/libc/fmt/fltfmt.c +++ b/sys/src/libc/fmt/fltfmt.c @@ -204,7 +204,7 @@ found: */ if(xadd(s1, c2, 5)) e++; - if(e >= -5 && e <= prec) { + if(e >= -4 && e <= prec) { c1 = -e - 1; c4 = prec - e; chr = 'h'; // flag for 'f' style -- 2.44.0