mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
Update.
* stdlib/strtod.c (str_to_mpn): Fix extending of n array which only should happen for cy != 0.
This commit is contained in:
parent
0e0316f403
commit
779515aff9
@ -1,5 +1,8 @@
|
||||
1998-06-17 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* stdlib/strtod.c (str_to_mpn): Fix extending of n array which
|
||||
only should happen for cy != 0.
|
||||
|
||||
* sysdeps/unix/sysv/linux/alpha/glob.c: Include sys/types.h before
|
||||
glob.h.
|
||||
|
||||
|
@ -309,16 +309,21 @@ str_to_mpn (const STRING_TYPE *str, int digcnt, mp_limb_t *n, mp_size_t *nsize,
|
||||
if (cnt == MAX_DIG_PER_LIMB)
|
||||
{
|
||||
if (*nsize == 0)
|
||||
n[0] = low;
|
||||
{
|
||||
n[0] = low;
|
||||
*nsize = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
mp_limb_t cy;
|
||||
cy = __mpn_mul_1 (n, n, *nsize, MAX_FAC_PER_LIMB);
|
||||
cy += __mpn_add_1 (n, n, *nsize, low);
|
||||
if (cy != 0)
|
||||
n[*nsize] = cy;
|
||||
{
|
||||
n[*nsize] = cy;
|
||||
++(*nsize);
|
||||
}
|
||||
}
|
||||
++(*nsize);
|
||||
cnt = 0;
|
||||
low = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user