From c24c9106e826aa3a6d64c60b76ee015210aea2d1 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Sat, 8 Nov 2003 11:35:22 +0000 Subject: Minor code fixup. Make sure that len reflects the current list size. --- Objects/listobject.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Objects/listobject.c b/Objects/listobject.c index cf00ab2..7198e34 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -1968,6 +1968,7 @@ fail: merge_freemem(&ms); if (keyfunc != NULL) { + len = PyList_GET_SIZE(self); for (i=0 ; i < len ; i++) { kvpair = PyList_GET_ITEM(self, i); value = sortwrapper_getvalue(kvpair); -- cgit v0.12