was using max short on a float in EDBM_face_find_nearest()
authorCampbell Barton <ideasman42@gmail.com>
Tue, 11 Dec 2012 14:21:52 +0000 (14:21 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 11 Dec 2012 14:21:52 +0000 (14:21 +0000)
source/blender/editors/mesh/editmesh_select.c

index 1c9fc75642645ea540c43bac48f7d954211e18bc..a98345cacec057efeb65e05a7a0e9deb17d9257a 100644 (file)
@@ -573,7 +573,7 @@ BMFace *EDBM_face_find_nearest(ViewContext *vc, float *r_dist)
 
                        data.mval_fl[0] = vc->mval[0];
                        data.mval_fl[1] = vc->mval[1];
-                       data.dist = 0x7FFF;     /* largest short */
+                       data.dist = FLT_MAX;
                        data.toFace = efa;
 
                        mesh_foreachScreenFace(vc, findnearestface__getDistance, &data, V3D_PROJ_TEST_CLIP_DEFAULT);