about summary refs log tree commit diff
path: root/stdlib/strtod.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/strtod.c')
-rw-r--r--stdlib/strtod.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/strtod.c b/stdlib/strtod.c
index 6bd2dd685a..989984e66d 100644
--- a/stdlib/strtod.c
+++ b/stdlib/strtod.c
@@ -396,7 +396,7 @@ STRTOF (nptr, endptr)
 
   /* Return 0.0 if no legal string is found.
      No character is used even if a sign was found.  */
-  if (!isdigit (c))
+  if (!isdigit (c) && (c != decimal || !isdigit (cp[1])))
     RETURN (0.0, nptr);
 
   /* Record the start of the digits, in case we will check their grouping.  */