Skip to content

Commit 588dad0

Browse files
committed
merge 3.4 (closes #22605)
2 parents da821db + 682124c commit 588dad0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/arraymodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2709,7 +2709,7 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
27092709
self->allocated = Py_SIZE(self);
27102710
}
27112711
}
2712-
else if (initial != NULL && array_Check(initial)) {
2712+
else if (initial != NULL && array_Check(initial) && len > 0) {
27132713
arrayobject *self = (arrayobject *)a;
27142714
arrayobject *other = (arrayobject *)initial;
27152715
memcpy(self->ob_item, other->ob_item, len * other->ob_descr->itemsize);

0 commit comments

Comments
 (0)