From 605a645e2c8b3ba61a9e7e2cbf3eba84b2fab424 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 6 Feb 2006 17:45:43 +0000 Subject: [PATCH] Quite weird... I recall I fixed it, then it came back again. Vertex selection (mesh edit) was using a short to calculate distances, which can overflow with vertices outside of view. --- source/blender/src/editmesh_mods.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/blender/src/editmesh_mods.c b/source/blender/src/editmesh_mods.c index 1663412a9bd..8c8315f23fa 100644 --- a/source/blender/src/editmesh_mods.c +++ b/source/blender/src/editmesh_mods.c @@ -461,7 +461,7 @@ int EM_init_backbuf_circle(short xs, short ys, short rads) static void findnearestvert__doClosest(void *userData, EditVert *eve, int x, int y, int index) { - struct { short mval[2], pass, select, dist; int lastIndex, closestIndex; EditVert *closest; } *data = userData; + struct { short mval[2], pass, select; int dist, lastIndex, closestIndex; EditVert *closest; } *data = userData; if (data->pass==0) { if (index<=data->lastIndex) @@ -472,7 +472,7 @@ static void findnearestvert__doClosest(void *userData, EditVert *eve, int x, int } if (data->dist>3) { - short temp = abs(data->mval[0] - x) + abs(data->mval[1]- y); + int temp = abs(data->mval[0] - x) + abs(data->mval[1]- y); if ((eve->f&1)==data->select) temp += 5; if (tempdist) { @@ -501,7 +501,7 @@ static EditVert *findnearestvert(short *dist, short sel) } } else { - struct { short mval[2], pass, select, dist; int lastIndex, closestIndex; EditVert *closest; } data; + struct { short mval[2], pass, select; int dist, lastIndex, closestIndex; EditVert *closest; } data; static int lastSelectedIndex=0; static EditVert *lastSelected=NULL;