mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
F_Cu | B_Cu is not the same as LSET( F_Cu ) | LSET( B_Cu), so you cannot do some_lset |= F_Cu | B_Cu (or rather you can, but it is not what you expect). F_Cu and B_Cu are just ints, so 0 | 2 == 2. This isn't the same as setting *bit indices* 0 and 2. OR-ing with 2 is setting bit index 1, which is F_Mask. You can set them one by one with lset.set( F_Cu ) or OR with LSET::ExternalCuMask() helper. But actually, we're trying to set all 'n' copper layers, and LSET has AllCuMask and we can save all the hassle in this function. Thanks to @aris-kimi for finding the problematic code lines and providing the foundation of this fix. Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19855