[Bf-blender-cvs] [12b805148f7] master: Cleanup: quiet asan overflow warning

Jacques Lucke noreply at git.blender.org
Wed Feb 24 12:10:51 CET 2021


Commit: 12b805148f754ec95eb2b236fbd28fbb0153bb3c
Author: Jacques Lucke
Date:   Wed Feb 24 12:10:45 2021 +0100
Branches: master
https://developer.blender.org/rB12b805148f754ec95eb2b236fbd28fbb0153bb3c

Cleanup: quiet asan overflow warning

===================================================================

M	source/blender/nodes/geometry/nodes/node_geo_point_distribute.cc

===================================================================

diff --git a/source/blender/nodes/geometry/nodes/node_geo_point_distribute.cc b/source/blender/nodes/geometry/nodes/node_geo_point_distribute.cc
index 553b8ea364f..d9878d54353 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_point_distribute.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_point_distribute.cc
@@ -379,7 +379,7 @@ BLI_NOINLINE static void compute_special_attributes(const Mesh &mesh,
     const float3 v1_pos = mesh.mvert[v1_index].co;
     const float3 v2_pos = mesh.mvert[v2_index].co;
 
-    ids[i] = (int)(bary_coord.hash()) + looptri_index;
+    ids[i] = (int)(bary_coord.hash() + (uint64_t)looptri_index);
     normal_tri_v3(normals[i], v0_pos, v1_pos, v2_pos);
     rotations[i] = normal_to_euler_rotation(normals[i]);
   }



More information about the Bf-blender-cvs mailing list