summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-10-11 23:39:35 (GMT)
committerGuido van Rossum <guido@python.org>2002-10-11 23:39:35 (GMT)
commitbfa5a14adb323cfa92d6c5c71d0fb786d543313a (patch)
tree6cae0eace767efe590f3c61cb1d413835f12327e /Objects
parentc18b3082294199415883c5ef6c66c69089f40a9e (diff)
downloadcpython-bfa5a14adb323cfa92d6c5c71d0fb786d543313a.zip
cpython-bfa5a14adb323cfa92d6c5c71d0fb786d543313a.tar.gz
cpython-bfa5a14adb323cfa92d6c5c71d0fb786d543313a.tar.bz2
Darn! Don't divide by zero. Bad fix. :-)
Diffstat (limited to 'Objects')
-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)