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.
This commit is contained in:
Ulrich Drepper 1999-06-24 13:25:48 +00:00
parent d0db5f488d
commit e22206f336
3 changed files with 8 additions and 2 deletions

View File

@ -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> 1999-06-24 Thorsten Kukuk <kukuk@suse.de>
* nscd/grpcache.c: Add "notfound" data to cache, not iov pointer. * nscd/grpcache.c: Add "notfound" data to cache, not iov pointer.

View File

@ -191,8 +191,8 @@ APPEND (FUNC_PREFIX, ecvt_r) (value, ndigit, decpt, sign, buf, len)
*sign = isfinite (value) ? signbit (value) != 0 : 0; *sign = isfinite (value) ? signbit (value) != 0 : 0;
} }
else else
if (APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit - 1, decpt, sign, if (APPEND (FUNC_PREFIX, fcvt_r) (value, MIN (ndigit, NDIGIT_MAX) - 1,
buf, len)) decpt, sign, buf, len))
return -1; return -1;
*decpt += exponent; *decpt += exponent;

View File

@ -56,6 +56,7 @@ static testcase ecvt_tests[] =
{ 123.01, -4, 3, "" }, { 123.01, -4, 3, "" },
{ 126.71, -4, 3, "" }, { 126.71, -4, 3, "" },
{ 0.0, 4, 1, "0000" }, { 0.0, 4, 1, "0000" },
{ 92.0, 16, 2, "920000000000000" },
/* -1.0 is end marker. */ /* -1.0 is end marker. */
{ -1.0, 0, 0, "" } { -1.0, 0, 0, "" }
}; };