summaryrefslogtreecommitdiffstats
path: root/Python/pystrtod.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pystrtod.c')
-rw-r--r--Python/pystrtod.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Python/pystrtod.c b/Python/pystrtod.c
index e1c84ea..6c19b45 100644
--- a/Python/pystrtod.c
+++ b/Python/pystrtod.c
@@ -90,6 +90,13 @@ PyOS_ascii_strtod(const char *nptr, char **endptr)
p++;
end = p;
}
+ else if (strncmp(p, decimal_point, decimal_point_len) == 0)
+ {
+ /* Python bug #1417699 */
+ *endptr = (char*)nptr;
+ errno = EINVAL;
+ return val;
+ }
/* For the other cases, we need not convert the decimal point */
}