summaryrefslogtreecommitdiffstats
path: root/newlib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/stdio/vfprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c
index 34ec68972..ab8202fc0 100644
--- a/newlib/libc/stdio/vfprintf.c
+++ b/newlib/libc/stdio/vfprintf.c
@@ -853,7 +853,7 @@ number: if ((dprec = prec) >= 0)
}
} else if (expt <= 0) {
PRINT("0", 1);
- if(ndig) {
+ if(expt || ndig) {
PRINT(decimal_point, 1);
PAD(-expt, zeroes);
PRINT(cp, ndig);