diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-16 14:12:34 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-16 14:12:34 (GMT) |
commit | 292dd1b2ad51285e793f23af4157251780c9a638 (patch) | |
tree | 7ec559983f9445dedb4c7994b66fa49fe38f1d86 | |
parent | f5894dd646f5e39918377b37b8c8694cebdca103 (diff) | |
download | cpython-292dd1b2ad51285e793f23af4157251780c9a638.zip cpython-292dd1b2ad51285e793f23af4157251780c9a638.tar.gz cpython-292dd1b2ad51285e793f23af4157251780c9a638.tar.bz2 |
Fixed an off-by-one error in _PyUnicode_EqualToASCIIString (issue #28701).
-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 15705e1..6212cc4 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -10846,7 +10846,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; |