star-enclosures-3d

Extract enclosures from 3D geometry
git clone git://git.meso-star.fr/star-enclosures-3d.git
Log | Files | Refs | README | LICENSE

commit e4b7efbbd5d1578ca4ffac48b197e13699bccb5e
parent 441b778fc9ed594022e47f3565b6a9d312dc8726
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Tue,  6 Mar 2018 16:47:26 +0100

Address possible overflow.

Diffstat:
Msrc/senc_scene_analyze.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/senc_scene_analyze.c b/src/senc_scene_analyze.c @@ -762,7 +762,7 @@ collect_and_link_neighbours const vrtx_id_t v1 = triangles_in[t].vertice_id[(ee + 1) % 3]; /* Process only "my" edges! */ const int64_t h = - v0 + v1 + MMIN(v0, v1); /* v0,v1 and v1,v0 must give the same hash!!! */ + v0 + v1 + (int64_t)MMIN(v0, v1); /* v0,v1 and v1,v0 must give the same hash!!! */ if(h % thread_count != rank) continue; /* Create edge. */ set_edge(v0, v1, &edge, &triangles_tmp[t].reversed_edge[ee]);