Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2000-08-16 22:30:40 +0400
committerJeff Johnston <jjohnstn@redhat.com>2000-08-16 22:30:40 +0400
commit5bacbf109f58efba1901137f251e79f9e0e1407a (patch)
treea9948129db0951043b1fef2dd9ee22346daff3a6 /newlib/libc/stdio
parente3c9eeaf79e37f8653eab2b6184c143da8e4303e (diff)
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')
-rw-r--r--newlib/libc/stdio/vfprintf.c8
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);