mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
@@ -2628,7 +2628,7 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||
self->allocated = Py_SIZE(self);
|
||||
}
|
||||
}
|
||||
else if (initial != NULL && array_Check(initial)) {
|
||||
else if (initial != NULL && array_Check(initial) && len > 0) {
|
||||
arrayobject *self = (arrayobject *)a;
|
||||
arrayobject *other = (arrayobject *)initial;
|
||||
memcpy(self->ob_item, other->ob_item, len * other->ob_descr->itemsize);
|
||||
|
||||
Reference in New Issue
Block a user