]> sourceware.org Git - newlib-cygwin.git/commitdiff
2003-07-29 Honda Hiroki <hhonda@ipflex.com>
authorJeff Johnston <jjohnstn@redhat.com>
Tue, 29 Jul 2003 20:45:11 +0000 (20:45 +0000)
committerJeff Johnston <jjohnstn@redhat.com>
Tue, 29 Jul 2003 20:45:11 +0000 (20:45 +0000)
        * libc/stdio/vfprintf.c: Set output size to 1 when
        we have %f format with precision 0 and # flag not specified.

newlib/ChangeLog
newlib/libc/stdio/vfprintf.c

index 4f280010194272124a29b662cf5b80ae55c0944f..ee43302f0db8a80db655a4c4ca0e270fa93a1932 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-29  Honda Hiroki  <hhonda@ipflex.com>
+
+       * libc/stdio/vfprintf.c: Set output size to 1 when
+       we have %f format with precision 0 and # flag not specified.
+
 2003-07-29  Alexandre Oliva  <aoliva@redhat.com>
 
        * libc/machine/mn10300/setjmp.S: Never emit both .am33 and
index 82255735e7ccda48f24a0e413614157ed86e48bd..c10103d2343e42f420264f7ee22f520c43dd4c24 100644 (file)
@@ -830,7 +830,9 @@ reswitch:   switch (ch) {
                                        if (prec || flags & ALT)
                                                size += prec + 1;
                                } else  /* "0.X" */
-                                       size = prec + 2;
+                                       size = (prec || flags & ALT)
+                                                 ? prec + 2
+                                                 : 1;
                        } else if (expt >= ndig) {      /* fixed g fmt */
                                size = expt;
                                if (flags & ALT)
This page took 0.045404 seconds and 5 git commands to generate.