summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index caad326..8608776 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -9604,6 +9604,8 @@ replace(PyObject *self, PyObject *str1,
else if (maxcount == 0 || slen == 0)
goto nothing;
+ if (str1 == str2)
+ goto nothing;
if (skind < kind1)
/* substring too wide to be present */
goto nothing;