mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
Bug #1417699: Reject locale-specific decimal point in float()
and atof().
This commit is contained in:
parent
82c276ea33
commit
fcfff0a7fa
4 changed files with 27 additions and 3 deletions
|
@ -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 */
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue