summary refs log tree commit diff
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/strtod.c2
-rw-r--r--stdlib/tst-strtod.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/stdlib/strtod.c b/stdlib/strtod.c
index 859e077b66..60a3de5228 100644
--- a/stdlib/strtod.c
+++ b/stdlib/strtod.c
@@ -406,7 +406,7 @@ INTERNAL (STRTOF) (nptr, endptr, group)
   if (mbtowc ((wchar_t *) &decimal, _NL_CURRENT (LC_NUMERIC, DECIMAL_POINT),
 	      strlen (_NL_CURRENT (LC_NUMERIC, DECIMAL_POINT))) <= 0)
     decimal = (wint_t) *_NL_CURRENT (LC_NUMERIC, DECIMAL_POINT);
-
+  assert (decimal != L'\0');
 
   /* Prepare number representation.  */
   exponent = 0;
diff --git a/stdlib/tst-strtod.c b/stdlib/tst-strtod.c
index 681bace013..a76529c4dd 100644
--- a/stdlib/tst-strtod.c
+++ b/stdlib/tst-strtod.c
@@ -37,6 +37,7 @@ static const struct ltest tests[] =
     { ".125", .125, '\0', 0 },
     { "1e20", 1e20, '\0', 0 },
     { "0e-19", 0, '\0', 0 },
+    { "4\00012", 4.0, '\0', 0 },
     { NULL, 0, '\0', 0 }
   };