Skip to content

Commit

Permalink
Fix out of bound vector (#3461)
Browse files Browse the repository at this point in the history
  • Loading branch information
tonynajjar authored Mar 9, 2023
1 parent afd96be commit 0a63bf9
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 0a63bf9

Please sign in to comment.