summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Objects/unicodeobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 09b5733..0e7493b 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -12078,8 +12078,8 @@ PyUnicode_Substring(PyObject *self, Py_ssize_t start, Py_ssize_t end)
return NULL;
}
if (start >= length || end < start) {
- assert(end == length);
- return PyUnicode_New(0, 0);
+ Py_INCREF(unicode_empty);
+ return unicode_empty;
}
length = end - start;