From 0eb55ac91208b58359e442553b6158739956ad39 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 13 Jul 1999 05:41:12 +0000 Subject: 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. --- Objects/tupleobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v0.12