From f144626e81c3b60bbc9a9c028e4a8ec1f5d96c24 Mon Sep 17 00:00:00 2001 From: Michael Mc Donnell Date: Wed, 21 Mar 2012 23:27:35 +0100 Subject: [PATCH] d3dx9: Do not weld self. --- dlls/d3dx9_36/mesh.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c index 022e66da2e4..84856b33a0b 100644 --- a/dlls/d3dx9_36/mesh.c +++ b/dlls/d3dx9_36/mesh.c @@ -6640,6 +6640,13 @@ HRESULT WINAPI D3DXWeldVertices(LPD3DXMESH mesh, BYTE *from = &vertices[vertex_size*point_reps[index] + decl_ptr->Offset]; FLOAT epsilon = get_component_epsilon(decl_ptr, epsilons); + /* Don't weld self */ + if (index == point_reps[index]) + { + matches++; + continue; + } + if (weld_component(to, from, decl_ptr->Type, epsilon)) matches++; }