From 292dd1b2ad51285e793f23af4157251780c9a638 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 16 Nov 2016 16:12:34 +0200 Subject: Fixed an off-by-one error in _PyUnicode_EqualToASCIIString (issue #28701). --- Objects/unicodeobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v0.12