commit | 0eb55ac91208b58359e442553b6158739956ad39 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Tue Jul 13 05:41:12 1999 +0000 |
committer | Guido van Rossum <guido@python.org> | Tue Jul 13 05:41:12 1999 +0000 |
tree | 56686916f602496cc8115cdc45f5684b93a8fa39 | |
parent | 5bc51f2f27dfeb57ae08b659ef1aa0c035077d60 [diff] |
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.
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 @@ 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)