diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-16 16:12:34 +0200 |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-16 16:12:34 +0200 |
| commit | 292dd1b2ad51285e793f23af4157251780c9a638 (patch) | |
| tree | 7ec559983f9445dedb4c7994b66fa49fe38f1d86 /Objects/unicodeobject.c | |
| parent | f5894dd646f5e39918377b37b8c8694cebdca103 (diff) | |
| download | cpython-git-292dd1b2ad51285e793f23af4157251780c9a638.tar.gz | |
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 15705e10f9..6212cc4c82 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; |
