Skip to content

Commit 292dd1b

Browse files
Fixed an off-by-one error in _PyUnicode_EqualToASCIIString (issue #28701).
1 parent f5894dd commit 292dd1b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/unicodeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10846,7 +10846,7 @@ non_ready_unicode_equal_to_ascii_string(PyObject *unicode, const char *str)
1084610846
assert(p);
1084710847
for (i = 0; i < len; i++) {
1084810848
unsigned char c = (unsigned char)str[i];
10849-
if (c > 128 || p[i] != (wchar_t)c)
10849+
if (c >= 128 || p[i] != (wchar_t)c)
1085010850
return 0;
1085110851
}
1085210852
return 1;

0 commit comments

Comments
 (0)