mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-05 08:00:30 +00:00
Merge vfprintf.c revision 1.52.
This commit is contained in:
parent
120b4a9366
commit
ce7be15190
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112229
|
@ -39,7 +39,7 @@
|
|||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)vfprintf.c 8.1 (Berkeley) 6/4/93";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
__FBSDID("FreeBSD: src/lib/libc/stdio/vfprintf.c,v 1.51 2003/03/12 20:30:00 das Exp");
|
||||
__FBSDID("FreeBSD: src/lib/libc/stdio/vfprintf.c,v 1.52 2003/03/14 04:48:09 das Exp");
|
||||
#endif
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
|
@ -1507,7 +1507,7 @@ cvt(double value, int ndigits, int flags, char *sign, int *decpt,
|
|||
/* print trailing zeros */
|
||||
bp = digits + ndigits;
|
||||
if (ch == 'f') {
|
||||
if (*digits == '0' && value)
|
||||
if ((*digits == '0' || *digits == '\0') && value)
|
||||
*decpt = -ndigits + 1;
|
||||
bp += *decpt;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue