about summary refs log tree commit diff
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/strtod_l.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c
index b3380fdba3..f24d4de73b 100644
--- a/stdlib/strtod_l.c
+++ b/stdlib/strtod_l.c
@@ -1513,6 +1513,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
 	      assert (numsize == densize);
 	      for (i = numsize; i > 0; --i)
 		num[i] = num[i - 1];
+	      num[0] = 0;
 	    }
 
 	  den[densize] = 0;
@@ -1557,6 +1558,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
 	      n0 = num[densize] = num[densize - 1];
 	      for (i = densize - 1; i > 0; --i)
 		num[i] = num[i - 1];
+	      num[0] = 0;
 
 	      got_limb;
 	    }