aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-02-27 11:52:41 +0000
committerUlrich Drepper <drepper@redhat.com>1998-02-27 11:52:41 +0000
commitb8ce6e3ee025d50cee0a9ccf332fa53145ecf65d (patch)
treeaf7d4c7306bad939d805555bd9bb49d3d66f4211
parenta7f804d855439cf45947d587af33df6aa8433ca4 (diff)
downloadglibc-b8ce6e3ee025d50cee0a9ccf332fa53145ecf65d.tar
glibc-b8ce6e3ee025d50cee0a9ccf332fa53145ecf65d.tar.gz
glibc-b8ce6e3ee025d50cee0a9ccf332fa53145ecf65d.tar.bz2
glibc-b8ce6e3ee025d50cee0a9ccf332fa53145ecf65d.zip
Update.
* misc/efgcvt_r.c (APPEND): Handle printing of 0.0 correctly. Reported by Göran Uddeborg <goeran@uddeborg.pp.se>.
-rw-r--r--ChangeLog3
-rw-r--r--misc/efgcvt_r.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 690d736d7d..94acd299de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
1998-02-27 Ulrich Drepper <drepper@cygnus.com>
+ * misc/efgcvt_r.c (APPEND): Handle printing of 0.0 correctly.
+ Reported by Göran Uddeborg <goeran@uddeborg.pp.se>.
+
* 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 9e586e15a8..6434b9deea 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. */