diff --git a/Modules/stropmodule.c b/Modules/stropmodule.c index 234a4dd42be..4b8a501c316 100644 --- a/Modules/stropmodule.c +++ b/Modules/stropmodule.c @@ -818,7 +818,7 @@ strop_atoi(self, args) x = (long) PyOS_strtoul(s, &end, base); else x = PyOS_strtol(s, &end, base); - if (end == s || !isxdigit(end[-1])) + if (end == s || !isalnum(end[-1])) goto bad; while (*end && isspace(Py_CHARMASK(*end))) end++;