summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-07-13 05:41:12 (GMT)
committerGuido van Rossum <guido@python.org>1999-07-13 05:41:12 (GMT)
commit0eb55ac91208b58359e442553b6158739956ad39 (patch)
tree56686916f602496cc8115cdc45f5684b93a8fa39 /Objects
parent5bc51f2f27dfeb57ae08b659ef1aa0c035077d60 (diff)
downloadcpython-0eb55ac91208b58359e442553b6158739956ad39.zip
cpython-0eb55ac91208b58359e442553b6158739956ad39.tar.gz
cpython-0eb55ac91208b58359e442553b6158739956ad39.tar.bz2
Mark Favas was quick to note that the last checkin divides by zero
when n == 0... So divide by a->ob_size instead which was already tested for 0.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/tupleobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 225835c..18b3315 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -374,7 +374,7 @@ tuplerepeat(a, n)
return (PyObject *)a;
}
size = a->ob_size * n;
- if (size/n != a->ob_size)
+ if (size/a->ob_size != n)
return PyErr_NoMemory();
np = (PyTupleObject *) PyTuple_New(size);
if (np == NULL)