diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-16 14:12:56 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-16 14:12:56 (GMT) |
commit | df66b9c425f90cc4a5dc910daf4ca3dedcc265c9 (patch) | |
tree | 05f523dc54b1bbd4ddf9fa2990ee874327bdd152 | |
parent | dddec81b2d0f0df7e91f2cafc3c2e4121cb6c1d6 (diff) | |
parent | 292dd1b2ad51285e793f23af4157251780c9a638 (diff) | |
download | cpython-df66b9c425f90cc4a5dc910daf4ca3dedcc265c9.zip cpython-df66b9c425f90cc4a5dc910daf4ca3dedcc265c9.tar.gz cpython-df66b9c425f90cc4a5dc910daf4ca3dedcc265c9.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 8bbf0d5..293b5c4 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -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; |