diff --git a/Triangulation_3/include/CGAL/Constrained_Delaunay_triangulation_3.h b/Triangulation_3/include/CGAL/Constrained_Delaunay_triangulation_3.h index 38a5eb42f97..3d28bea2afc 100644 --- a/Triangulation_3/include/CGAL/Constrained_Delaunay_triangulation_3.h +++ b/Triangulation_3/include/CGAL/Constrained_Delaunay_triangulation_3.h @@ -973,6 +973,7 @@ private: CDT_2_face_handle fh; bool outside; }; + const auto d = cdt_2.dimension(); std::stack stack; stack.push({cdt_2.infinite_face(), true}); while(!stack.empty()) { @@ -980,7 +981,7 @@ private: stack.pop(); if(fh->info().is_outside_the_face == -1) { fh->info().is_outside_the_face = outside; - for(int i = 0; i < 3; ++i) { + for(int i = 0; i <= d; ++i) { const auto neighbor = fh->neighbor(i); const auto new_outside = fh->is_constrained(i) ? !outside : outside; if(neighbor->info().is_outside_the_face == -1) {