diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-06-24 13:25:48 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-06-24 13:25:48 +0000 |
commit | e22206f336cee36e8ab77136d798828c723b4c8d (patch) | |
tree | 715b6e46cb86ec31f6e3c1e0ffe050fbd2ab5214 | |
parent | d0db5f488d9a47947c49f728ca29077c0cff48b1 (diff) | |
download | glibc-e22206f336cee36e8ab77136d798828c723b4c8d.tar.gz glibc-e22206f336cee36e8ab77136d798828c723b4c8d.tar.xz glibc-e22206f336cee36e8ab77136d798828c723b4c8d.zip |
Update.
1999-06-24 Ulrich Drepper <drepper@cygnus.com> * misc/tst-efgcvt.c (ecvt_tests): Test 92.0 with ndigits == 16. * misc/efgcvt_r.c (ecvt_r): Limit ndigits before passing it to fcvt_r.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | misc/efgcvt_r.c | 4 | ||||
-rw-r--r-- | misc/tst-efgcvt.c | 1 |
3 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 56b0d290b1..529f2dad2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-06-24 Ulrich Drepper <drepper@cygnus.com> + + * misc/tst-efgcvt.c (ecvt_tests): Test 92.0 with ndigits == 16. + * misc/efgcvt_r.c (ecvt_r): Limit ndigits before passing it to fcvt_r. + 1999-06-24 Thorsten Kukuk <kukuk@suse.de> * nscd/grpcache.c: Add "notfound" data to cache, not iov pointer. diff --git a/misc/efgcvt_r.c b/misc/efgcvt_r.c index 167bd7a809..944fe4cc98 100644 --- a/misc/efgcvt_r.c +++ b/misc/efgcvt_r.c @@ -191,8 +191,8 @@ APPEND (FUNC_PREFIX, ecvt_r) (value, ndigit, decpt, sign, buf, len) *sign = isfinite (value) ? signbit (value) != 0 : 0; } else - if (APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit - 1, decpt, sign, - buf, len)) + if (APPEND (FUNC_PREFIX, fcvt_r) (value, MIN (ndigit, NDIGIT_MAX) - 1, + decpt, sign, buf, len)) return -1; *decpt += exponent; diff --git a/misc/tst-efgcvt.c b/misc/tst-efgcvt.c index cfbaa21cb1..d0ebd0d863 100644 --- a/misc/tst-efgcvt.c +++ b/misc/tst-efgcvt.c @@ -56,6 +56,7 @@ static testcase ecvt_tests[] = { 123.01, -4, 3, "" }, { 126.71, -4, 3, "" }, { 0.0, 4, 1, "0000" }, + { 92.0, 16, 2, "920000000000000" }, /* -1.0 is end marker. */ { -1.0, 0, 0, "" } }; |