Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit baa4546

Browse files
author
Kristján Valur Jónsson
committed
Add missing Py_CHARMASK when calling isspace().
Found by enabling runtime tests on windows, by disabling the _set_invalid_parameter_handler() fiddling.
1 parent 3ad3a0d commit baa4546

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Objects/floatobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ float_fromhex(PyObject *cls, PyObject *arg)
12381238
********************/
12391239

12401240
/* leading whitespace and optional sign */
1241-
while (isspace(*s))
1241+
while (isspace(Py_CHARMASK(*s)))
12421242
s++;
12431243
if (*s == '-') {
12441244
s++;
@@ -1308,7 +1308,7 @@ float_fromhex(PyObject *cls, PyObject *arg)
13081308
exp = 0;
13091309

13101310
/* optional trailing whitespace leading to the end of the string */
1311-
while (isspace(*s))
1311+
while (isspace(Py_CHARMASK(*s)))
13121312
s++;
13131313
if (s != s_end)
13141314
goto parse_error;

0 commit comments

Comments
 (0)