git: 9front

Download patch

ref: 9bcb7ba01e8044d3e9efe10b968508d8119a4b32
parent: 1a2ccaf1fbd823c46113227b5396fac48d7f11b5
author: ppatience0 <ppatience0@gmail.com>
date: Fri Mar 1 12:23:26 EST 2013

fltfmt: fix %g not printing as %e in some cases when it should

--- a/sys/src/libc/fmt/fltfmt.c
+++ b/sys/src/libc/fmt/fltfmt.c
@@ -204,7 +204,7 @@
 		 */
 		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
--