grid_map icon indicating copy to clipboard operation
grid_map copied to clipboard

fix(SpiralIterator): Avoid improper use of '++', which may cause prog…

Open luanlongshengv opened this issue 1 year ago • 2 comments

This PR addresses an issue in the SpiralIterator::operator++() function where the pop_back() method was called on an empty pointsRing_ container, leading to undefined behavior. The fix involves adding a check to ensure that pointsRing_ is not empty before attempting to call pop_back(). This change prevents potential crashes and ensures the iterator operates correctly even when the container is empty. This change ensures the iterator’s robustness and prevents potential runtime errors.

luanlongshengv avatar Oct 17 '24 08:10 luanlongshengv

@maximilianwulf Please merge this fix

Ryanf55 avatar Nov 08 '24 05:11 Ryanf55

This has been merged into all of the maintained ROS 2 branches.

Ryanf55 avatar Nov 28 '24 03:11 Ryanf55