EasyEDA Std: COPPERAREA parsing failsafe.

Fixes KICAD-41Q
This commit is contained in:
Alex Shvartzkop 2023-11-04 13:55:29 +03:00
parent 97185ba90c
commit 8752f75ef9
1 changed files with 12 additions and 2 deletions

View File

@ -567,8 +567,18 @@ void PCB_EASYEDA_PARSER::ParseToBoardItemContainer(
zone->SetMinThickness( minThickness );
}
zone->SetThermalReliefSpokeWidth(
std::max( int( ConvertSize( arr[18] ) ), zone->GetMinThickness() ) );
if( arr.size() > 18 )
{
zone->SetThermalReliefSpokeWidth(
std::max( int( ConvertSize( arr[18] ) ), zone->GetMinThickness() ) );
}
else
{
wxFAIL_MSG( wxString::Format( "COPPERAREA unexpected size %d: %s ", arr.size(),
shape ) );
zone->SetThermalReliefSpokeWidth( zone->GetMinThickness() );
}
aContainer->Add( zone.release(), ADD_MODE::APPEND );
}