summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index a577bfd4d7..03b5dbd970 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -3765,7 +3765,7 @@ int PyUnicode_Contains(PyObject *container,
else {
end = lhs + (PyUnicode_GET_SIZE(u) - size);
while (lhs <= end) {
- if (memcmp(lhs++, rhs, size) == 0) {
+ if (memcmp(lhs++, rhs, size * sizeof(Py_UNICODE)) == 0) {
result = 1;
break;
}