diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-16 14:13:13 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-16 14:13:13 (GMT) |
commit | e6d6131f78fdb08fa8270b7b689571d8058208e3 (patch) | |
tree | fb78542d8271ed3a3f322e5381648278d3748092 /Objects/unicodeobject.c | |
parent | 503db266a5fa4043b57f558645f4bfe18ffec5b6 (diff) | |
parent | df66b9c425f90cc4a5dc910daf4ca3dedcc265c9 (diff) | |
download | cpython-e6d6131f78fdb08fa8270b7b689571d8058208e3.zip cpython-e6d6131f78fdb08fa8270b7b689571d8058208e3.tar.gz cpython-e6d6131f78fdb08fa8270b7b689571d8058208e3.tar.bz2 |
Fixed an off-by-one error in _PyUnicode_EqualToASCIIString (issue #28701).
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r-- | Objects/unicodeobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 4b28ce4..25b3b1d 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -11051,7 +11051,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; |