Skip to content

Commit

Permalink
Fix out of bound vector (ros-navigation#3461) (ros-navigation#3463)
Browse files Browse the repository at this point in the history
(cherry picked from commit 0a63bf9)

Co-authored-by: Tony Najjar <[email protected]>
  • Loading branch information
2 people authored and RBT22 committed Oct 24, 2023
1 parent 1b0f6d7 commit b90d0bf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ inline void findPathCosts(
auto * costmap = costmap_ros->getCostmap();
unsigned int map_x, map_y;
const size_t path_segments_count = data.path.x.shape(0) - 1;
data.path_pts_valid = std::vector<bool>(path_segments_count - 1, false);
data.path_pts_valid = std::vector<bool>(path_segments_count, false);
for (unsigned int idx = 0; idx < path_segments_count; idx++) {
const auto path_x = data.path.x(idx);
const auto path_y = data.path.y(idx);
Expand Down

0 comments on commit b90d0bf

Please sign in to comment.