From 82d73042f871f8e8166e1e677f13a2fd7c477b68 Mon Sep 17 00:00:00 2001 From: jjohnstn Date: Mon, 23 Apr 2007 21:55:31 +0000 Subject: [PATCH] 2007-04-23 Brian Dessent * libc/stdio/vfprintf.c (_vfprintf_r): When the alternate-form flag has been specified with types 'f', 'F', 'g', or 'G', ensure the trailing decimal is printed. --- newlib/libc/stdio/vfprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c index 72df0f28a1..0e40a3e8f9 100644 --- a/newlib/libc/stdio/vfprintf.c +++ b/newlib/libc/stdio/vfprintf.c @@ -1235,7 +1235,7 @@ number: if ((dprec = prec) >= 0) } } else if (expt <= 0) { PRINT ("0", 1); - if(expt || ndig) { + if(expt || ndig || (flags & ALT)) { PRINT (decimal_point, 1); PAD (-expt, zeroes); PRINT (cp, ndig); -- 2.11.0