summaryrefslogtreecommitdiff
path: root/libc/stdlib/strtod_l.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib/strtod_l.c')
-rw-r--r--libc/stdlib/strtod_l.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libc/stdlib/strtod_l.c b/libc/stdlib/strtod_l.c
index e34ec14c3..a38242ac0 100644
--- a/libc/stdlib/strtod_l.c
+++ b/libc/stdlib/strtod_l.c
@@ -1504,7 +1504,9 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
register int i;
(void) __mpn_lshift (&retval[used
/ BITS_PER_MP_LIMB],
- retval, RETURN_LIMB_SIZE,
+ retval,
+ (RETURN_LIMB_SIZE
+ - used / BITS_PER_MP_LIMB),
used % BITS_PER_MP_LIMB);
for (i = used / BITS_PER_MP_LIMB - 1; i >= 0; --i)
retval[i] = 0;