Skip to content

Commit 70ca11a

Browse files
committed
fix comment
1 parent ad692fb commit 70ca11a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Objects/unicodeobject.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,10 +1430,13 @@ _copy_characters(PyObject *to, Py_ssize_t to_start,
14301430
assert(from_start + how_many <= PyUnicode_GET_LENGTH(from));
14311431

14321432
assert(to == NULL || PyUnicode_Check(to));
1433-
assert(how_many == 0 || (to_start + how_many <= PyUnicode_GET_LENGTH(to)));
14341433

1435-
if (how_many == 0)
1434+
if (how_many == 0) {
14361435
return 0;
1436+
}
1437+
1438+
assert(to != NULL);
1439+
assert(to_start + how_many <= PyUnicode_GET_LENGTH(to));
14371440

14381441
from_kind = PyUnicode_KIND(from);
14391442
from_data = PyUnicode_DATA(from);

0 commit comments

Comments
 (0)