Commit 2726f56a authored by Serhiy Storchaka's avatar Serhiy Storchaka

Fixed an off-by-one error in _PyUnicode_EqualToASCIIString (issue #28701).

parents ab40208a cf86bcd1
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment