diff options
-rw-r--r-- | lib/libc/stdio/vfprintf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c index dc2769e..94e65cd 100644 --- a/lib/libc/stdio/vfprintf.c +++ b/lib/libc/stdio/vfprintf.c @@ -730,7 +730,8 @@ number: if ((dprec = prec) >= 0) if (ch >= 'f') { /* 'f' or 'g' */ if (_double == 0) { /* kludge for __dtoa irregularity */ - if (prec == 0 && (flags & ALT) == 0) { + if (expt >= ndig && + (flags & ALT) == 0) { PRINT("0", 1); } else { PRINT("0.", 2); |