From 8c1e1da565bca9cec792323eb728e288715ef7c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Langa?= Date: Wed, 22 Sep 2021 01:33:59 +0200 Subject: [3.10] [codemod] Fix non-matching bracket pairs (GH-28473) (GH-28511) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Terry Jan Reedy Co-authored-by: Serhiy Storchaka Co-authored-by: Ɓukasz Langa (cherry picked from commit 8f943ca25732d548cf9f0b0393ba8d582fb93e29) Co-authored-by: Mohamad Mansour <66031317+mohamadmansourX@users.noreply.github.com> --- Objects/unicodeobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Objects/unicodeobject.c') diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 342e7eec06..849dd5cfe2 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -11023,7 +11023,7 @@ replace(PyObject *self, PyObject *str1, release1 = 1; } /* new_size = PyUnicode_GET_LENGTH(self) + n * (PyUnicode_GET_LENGTH(str2) - - PyUnicode_GET_LENGTH(str1))); */ + PyUnicode_GET_LENGTH(str1)); */ if (len1 < len2 && len2 - len1 > (PY_SSIZE_T_MAX - slen) / n) { PyErr_SetString(PyExc_OverflowError, "replace string is too long"); -- cgit v1.2.1