Altium: Fix calculating third arc point from uninitialized memory

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8671
This commit is contained in:
david-beinder 2021-07-18 17:24:51 +02:00 committed by Wayne Stambaugh
parent 234b414e2c
commit af90d47edc
1 changed files with 2 additions and 3 deletions

View File

@ -1800,12 +1800,11 @@ void ALTIUM_PCB::ParseArcs6Data( const CFB::CompoundFileReader& aReader,
else
{
shape.SetShape( PCB_SHAPE_TYPE::ARC );
shape.SetAngle( -NormalizeAngleDegreesPos( elem.endangle - elem.startangle ) * 10. );
double startradiant = DEG2RAD( elem.startangle );
wxPoint arcStartOffset = wxPoint( KiROUND( std::cos( startradiant ) * elem.radius ),
-KiROUND( std::sin( startradiant ) * elem.radius ) );
-KiROUND( std::sin( startradiant ) * elem.radius ) );
shape.SetArcStart( elem.center + arcStartOffset );
shape.SetAngle( -NormalizeAngleDegreesPos( elem.endangle - elem.startangle ) * 10. );
}
ZONE* zone = new ZONE( m_board );