mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
Fixed an off-by-one error in _PyUnicode_EqualToASCIIString (issue #28701).
This commit is contained in:
commit
df66b9c425
1 changed files with 1 additions and 1 deletions
|
@ -11070,7 +11070,7 @@ non_ready_unicode_equal_to_ascii_string(PyObject *unicode, const char *str)
|
|||
assert(p);
|
||||
for (i = 0; i < len; i++) {
|
||||
unsigned char c = (unsigned char)str[i];
|
||||
if (c > 128 || p[i] != (wchar_t)c)
|
||||
if (c >= 128 || p[i] != (wchar_t)c)
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue