Only test existing layers.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19694

(cherry picked from commit 062a03c3aa)
This commit is contained in:
Jeff Young
2025-01-20 20:16:29 +00:00
parent eb10e6d4a1
commit 81432e4da7
@@ -1366,7 +1366,7 @@ void PCB_IO_KICAD_SEXPR::formatLayers( LSET aLayerMask, int aNestLevel ) const
output += "(layers";
static const LSET cu_all( LSET::AllCuMask() );
static const LSET cu_all( LSET::AllCuMask( m_board->GetCopperLayerCount() ) );
static const LSET fr_bk( 2, B_Cu, F_Cu );
static const LSET adhes( 2, B_Adhes, F_Adhes );
static const LSET paste( 2, B_Paste, F_Paste );