]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - stdlib/strtod_l.c
Fix strtod multiple-precision division bug (bug 26137).
[thirdparty/glibc.git] / stdlib / strtod_l.c
index a3836fc12e53c3e6bcfcc3b1734b2ddfc6ab87dc..158da787a2efb9ff6fe312d69820f8dbe26fef9f 100644 (file)
@@ -1648,8 +1648,8 @@ ____STRTOF_INTERNAL (const STRING_TYPE *nptr, STRING_TYPE **endptr, int group,
          d1 = den[densize - 2];
 
          /* The division does not work if the upper limb of the two-limb
-            numerator is greater than the denominator.  */
-         if (__mpn_cmp (num, &den[densize - numsize], numsize) > 0)
+            numerator is greater or equal to than the denominator.  */
+         if (__mpn_cmp (num, &den[densize - numsize], numsize) >= 0)
            num[numsize++] = 0;
 
          if (numsize < densize)