altium: Via record can have size=74, which was not supported by us

Fix: https://gitlab.com/kicad/code/kicad/-/issues/5543
This commit is contained in:
Thomas Pointhuber 2020-10-20 10:22:24 +02:00
parent 7c9acc605d
commit 7642bbc090
1 changed files with 11 additions and 3 deletions

View File

@ -800,7 +800,7 @@ AVIA6::AVIA6( ALTIUM_PARSER& aReader )
}
// Subrecord 1
aReader.ReadAndSetSubrecordLength();
size_t subrecord1 = aReader.ReadAndSetSubrecordLength();
aReader.Skip( 1 );
@ -821,8 +821,16 @@ AVIA6::AVIA6( ALTIUM_PARSER& aReader )
layer_start = static_cast<ALTIUM_LAYER>( aReader.Read<uint8_t>() );
layer_end = static_cast<ALTIUM_LAYER>( aReader.Read<uint8_t>() );
if( subrecord1 <= 74 )
{
viamode = ALTIUM_PAD_MODE::SIMPLE;
}
else
{
aReader.Skip( 43 );
viamode = static_cast<ALTIUM_PAD_MODE>( aReader.Read<uint8_t>() );
}
aReader.SkipSubrecord();