summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Objects/stringobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index d341436..d135991 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -2594,7 +2594,7 @@ string_replace(PyStringObject *self, PyObject *args)
from_s = PyString_AS_STRING(from);
from_len = PyString_GET_SIZE(from);
}
- if (PyUnicode_Check(from))
+ else if (PyUnicode_Check(from))
return PyUnicode_Replace((PyObject *)self,
from, to, count);
else if (PyObject_AsCharBuffer(from, &from_s, &from_len))