Skip to content

Commit

Permalink
fix(utils): guard invalid access
Browse files Browse the repository at this point in the history
Signed-off-by: satoshi-ota <[email protected]>
  • Loading branch information
satoshi-ota authored and takayuki5168 committed Oct 25, 2023
1 parent 2a62b9d commit a2377b2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions planning/behavior_path_planner/src/utils/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2003,6 +2003,11 @@ void makeBoundLongitudinallyMonotonic(
std::vector<Point> ret = bound;
auto itr = std::next(ret.begin());
while (std::next(itr) != ret.end()) {
if (itr == ret.begin()) {
itr++;
continue;
}

const auto p1 = *std::prev(itr);
const auto p2 = *itr;
const auto p3 = *std::next(itr);
Expand Down

0 comments on commit a2377b2

Please sign in to comment.