diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2000-08-16 18:30:40 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2000-08-16 18:30:40 +0000 |
commit | 5bacbf109f58efba1901137f251e79f9e0e1407a (patch) | |
tree | a9948129db0951043b1fef2dd9ee22346daff3a6 /newlib/libc/stdio/vfprintf.c | |
parent | e3c9eeaf79e37f8653eab2b6184c143da8e4303e (diff) | |
download | cygnal-5bacbf109f58efba1901137f251e79f9e0e1407a.tar.gz cygnal-5bacbf109f58efba1901137f251e79f9e0e1407a.tar.bz2 cygnal-5bacbf109f58efba1901137f251e79f9e0e1407a.zip |
2000-08-16 Eric Fifer <efifer@sanwaint.com>
* libc/stdio/vfprintf.c (_vfprintf_r): suppress . with "%.0f", 0.1
Diffstat (limited to 'newlib/libc/stdio/vfprintf.c')
-rw-r--r-- | newlib/libc/stdio/vfprintf.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c index a96ce0c7d..117f7eb80 100644 --- a/newlib/libc/stdio/vfprintf.c +++ b/newlib/libc/stdio/vfprintf.c @@ -805,9 +805,11 @@ number: if ((dprec = prec) >= 0) } } else if (expt <= 0) { PRINT("0", 1); - PRINT(decimal_point, 1); - PAD(-expt, zeroes); - PRINT(cp, ndig); + if(ndig) { + PRINT(decimal_point, 1); + PAD(-expt, zeroes); + PRINT(cp, ndig); + } } else if (expt >= ndig) { PRINT(cp, ndig); PAD(expt - ndig, zeroes); |