Browse Source

ODB++: don't overrun the bezier point list

This produced a spurious point (at best, a crash at worst)
when exporting bezier curves.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/18706
pcb_db
John Beard 12 months ago
parent
commit
04d7bcc45e
  1. 2
      pcbnew/pcb_io/odbpp/odb_feature.cpp

2
pcbnew/pcb_io/odbpp/odb_feature.cpp

@ -185,7 +185,7 @@ void FEATURES_MANAGER::AddShape( const PCB_SHAPE& aShape, PCB_LAYER_ID aLayer )
{
const std::vector<VECTOR2I>& points = aShape.GetBezierPoints();
for( size_t i = 0; i < points.size(); i++ )
for( size_t i = 0; i < points.size() - 1; i++ )
{
AddFeatureLine( points[i], points[i + 1], aShape.GetStroke().GetWidth() );
}

Loading…
Cancel
Save