[Bf-blender-cvs] [6299d84e103] master: Fix uninitialized variable use w/ kdopbvh ray projection
Campbell Barton
noreply at git.blender.org
Wed Jan 16 05:03:35 CET 2019
Commit: 6299d84e103f3c8e0bb49188f0353220abb5c860
Author: Campbell Barton
Date: Wed Jan 16 15:00:32 2019 +1100
Branches: master
https://developer.blender.org/rB6299d84e103f3c8e0bb49188f0353220abb5c860
Fix uninitialized variable use w/ kdopbvh ray projection
Snapping verts for eg would use these values uninitialized.
===================================================================
M source/blender/blenlib/intern/math_geom.c
===================================================================
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index d9f4183d8ab..bd1e3d0a12b 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -860,6 +860,10 @@ float dist_squared_to_projected_aabb(
float rtmin, rtmax;
int main_axis;
+ r_axis_closest[0] = false;
+ r_axis_closest[1] = false;
+ r_axis_closest[2] = false;
+
if ((tmax[0] <= tmax[1]) && (tmax[0] <= tmax[2])) {
rtmax = tmax[0];
va[0] = vb[0] = local_bvmax[0];
More information about the Bf-blender-cvs
mailing list