summaryrefslogtreecommitdiffstats
path: root/Objects/listobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/listobject.c')
-rw-r--r--Objects/listobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c
index 2cb08d3..45b0951 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -421,7 +421,7 @@ list_repeat(PyListObject *a, int n)
if (n < 0)
n = 0;
size = a->ob_size * n;
- if (size/a->ob_size != n)
+ if (n && size/n != a->ob_size)
return PyErr_NoMemory();
np = (PyListObject *) PyList_New(size);
if (np == NULL)