From: Ulrich Drepper Date: Fri, 27 Feb 1998 11:52:41 +0000 (+0000) Subject: Update. X-Git-Tag: cvs/libc-ud-980319~80 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b8ce6e3ee025d50cee0a9ccf332fa53145ecf65d;p=thirdparty%2Fglibc.git Update. * misc/efgcvt_r.c (APPEND): Handle printing of 0.0 correctly. Reported by Göran Uddeborg . --- diff --git a/ChangeLog b/ChangeLog index 690d736d7d4..94acd299de0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 1998-02-27 Ulrich Drepper + * misc/efgcvt_r.c (APPEND): Handle printing of 0.0 correctly. + Reported by Göran Uddeborg . + * misc/tst-efgcvt.c (ecvt_tests): Add new test case for reported bug. diff --git a/misc/efgcvt_r.c b/misc/efgcvt_r.c index 9e586e15a84..6434b9deea1 100644 --- a/misc/efgcvt_r.c +++ b/misc/efgcvt_r.c @@ -106,7 +106,7 @@ APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit, decpt, sign, buf, len) ++i; while (i < n && !isdigit (buf[i])); - if (*decpt == 1 && buf[0] == '0') + if (*decpt == 1 && buf[0] == '0' && value != 0.0) { /* We must not have leading zeroes. Strip them all out and adjust *DECPT if necessary. */