diff --git a/Convex_hull_3/include/CGAL/Convex_hull_3/internal/Indexed_triangle_set.h b/Convex_hull_3/include/CGAL/Convex_hull_3/internal/Indexed_triangle_set.h
index 524f45e6a65..4f0cd084183 100644
--- a/Convex_hull_3/include/CGAL/Convex_hull_3/internal/Indexed_triangle_set.h
+++ b/Convex_hull_3/include/CGAL/Convex_hull_3/internal/Indexed_triangle_set.h
@@ -62,9 +62,9 @@ void copy_ch2_to_face_graph(const std::list
& CH_2,
for(std::size_t i = 1; i < CH_2.size()-1; ++i){
CGAL::internal::resize(its.faces[i-1], 3);
- its.faces[i-1][0] = static_cast(i);
- its.faces[i-1][1] = static_cast(i + 1);
- its.faces[i-1][2] = static_cast(i + 2);
+ its.faces[i-1][0] = static_cast(i - 1);
+ its.faces[i-1][1] = static_cast(i);
+ its.faces[i-1][2] = static_cast(i + 1);
}
}
diff --git a/Convex_hull_3/test/Convex_hull_3/quickhull_degenerate_test_3.cpp b/Convex_hull_3/test/Convex_hull_3/quickhull_degenerate_test_3.cpp
index ead5fa229d9..e1ca3febc58 100644
--- a/Convex_hull_3/test/Convex_hull_3/quickhull_degenerate_test_3.cpp
+++ b/Convex_hull_3/test/Convex_hull_3/quickhull_degenerate_test_3.cpp
@@ -186,6 +186,13 @@ int main()
Triangle_3 ch_triangle;
assert(CGAL::assign(ch_triangle, ch_object));
+ std::vector pts;
+ std::vector > faces;
+ CGAL::convex_hull_3(points.begin(), points.end(), pts, faces);
+ assert(faces.size() == 1);
+ for (int i : faces[0])
+ assert(0 <= i && i <= 2);
+
std::cout << "Testing hull of four points " << std::endl;
Point_3 p4(1, 1, 1);
points.push_back(p4);