diff --git a/Python/pystrtod.c b/Python/pystrtod.c index 53d6325f89b..e1c84ea03e0 100644 --- a/Python/pystrtod.c +++ b/Python/pystrtod.c @@ -105,7 +105,7 @@ PyOS_ascii_strtod(const char *nptr, char **endptr) copy = (char *)PyMem_MALLOC(end - nptr + 1 + decimal_point_len); if (copy == NULL) { if (endptr) - *endptr = nptr; + *endptr = (char *)nptr; errno = ENOMEM; return val; }