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 afe4359ca4..8d773ecb3d 100644
--- a/stdlib/strtod.c
+++ b/stdlib/strtod.c
@@ -568,7 +568,7 @@ INTERNAL (STRTOF) (nptr, endptr, group LOCALE_PARAM)
   for (cnt = 0; decimal[cnt] != '\0'; ++cnt)
     if (cp[cnt] != decimal[cnt])
       break;
-  if (decimal[cnt] == '\0' && cp[1] >= '0' && cp[1] <= '9')
+  if (decimal[cnt] == '\0' && cp[cnt] >= '0' && cp[cnt] <= '9')
     {
       /* We accept it.  This funny construct is here only to indent
 	 the code directly.  */