Skip to content

Commit d537cb1

Browse files
authored
fix unsigned long comparison (#2310)
1 parent 0ade922 commit d537cb1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

nav2_util/include/nav2_util/geometry_utils.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ inline Iter min_by(Iter begin, Iter end, Getter getCompareVal)
117117
*/
118118
inline double calculate_path_length(const nav_msgs::msg::Path & path, size_t start_index = 0)
119119
{
120-
if (start_index >= path.poses.size() - 1) {
120+
if (start_index + 1 >= path.poses.size()) {
121121
return 0.0;
122122
}
123123
double path_length = 0.0;

0 commit comments

Comments
 (0)