summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-11-16 14:12:56 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-11-16 14:12:56 (GMT)
commitdf66b9c425f90cc4a5dc910daf4ca3dedcc265c9 (patch)
tree05f523dc54b1bbd4ddf9fa2990ee874327bdd152
parentdddec81b2d0f0df7e91f2cafc3c2e4121cb6c1d6 (diff)
parent292dd1b2ad51285e793f23af4157251780c9a638 (diff)
downloadcpython-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.c2
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;