From de762ae55590cae8339d01a81ac84af82f104aef Mon Sep 17 00:00:00 2001 From: Ken Hughes Date: Thu, 24 Aug 2006 19:28:36 +0000 Subject: [PATCH] ===Python API=== Bugfix: Mesh.faces.extend() would incorrectly add duplicate faces in some circumstances. --- source/blender/python/api2_2x/Mesh.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/blender/python/api2_2x/Mesh.c b/source/blender/python/api2_2x/Mesh.c index 926b4f4add1..978e679e8af 100644 --- a/source/blender/python/api2_2x/Mesh.c +++ b/source/blender/python/api2_2x/Mesh.c @@ -4837,13 +4837,15 @@ static PyObject *MFaceSeq_extend( BPy_MEdgeSeq * self, PyObject *args ) /* eliminate new faces already in the mesh */ tmppair = newpair; - for( i = good_faces; i-- ; ) { + i = good_faces; + while( i ) { if( tmppair->v[1] ) { if( bsearch( tmppair, oldpair, mesh->totface, sizeof(SrchFaces), mface_comp ) ) { tmppair->v[1] = 0; /* mark as duplicate */ --good_faces; - } + } + --i; } tmppair++; }