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:
parent
7c9acc605d
commit
7642bbc090
|
@ -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>() );
|
||||
aReader.Skip( 43 );
|
||||
viamode = static_cast<ALTIUM_PAD_MODE>( 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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue