diff options
author | Guido van Rossum <guido@python.org> | 1999-07-13 05:41:12 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-07-13 05:41:12 (GMT) |
commit | 0eb55ac91208b58359e442553b6158739956ad39 (patch) | |
tree | 56686916f602496cc8115cdc45f5684b93a8fa39 /Objects/tupleobject.c | |
parent | 5bc51f2f27dfeb57ae08b659ef1aa0c035077d60 (diff) | |
download | cpython-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/tupleobject.c')
-rw-r--r-- | Objects/tupleobject.c | 2 |
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) |