diff --git a/include/boost/geometry/algorithms/detail/distance/range_to_segment_or_box.hpp b/include/boost/geometry/algorithms/detail/distance/range_to_segment_or_box.hpp index e1d113ff3..56ff37616 100644 --- a/include/boost/geometry/algorithms/detail/distance/range_to_segment_or_box.hpp +++ b/include/boost/geometry/algorithms/detail/distance/range_to_segment_or_box.hpp @@ -132,7 +132,7 @@ private: comparable_return_type cd_min = strategy.apply(point, box_points[0], box_points[3]); - for (unsigned int i = 0; i < 2; ++i) + for (unsigned int i = 0; i < 3; ++i) { comparable_return_type cd = strategy.apply(point, box_points[i], box_points[i+1]);