diff --git a/pcbnew/pcb_io/cadstar/cadstar_pcb_archive_loader.cpp b/pcbnew/pcb_io/cadstar/cadstar_pcb_archive_loader.cpp index c5872f0165..348b8c90f9 100644 --- a/pcbnew/pcb_io/cadstar/cadstar_pcb_archive_loader.cpp +++ b/pcbnew/pcb_io/cadstar/cadstar_pcb_archive_loader.cpp @@ -2357,7 +2357,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadNets() auto getJunctionSize = [&]( NETELEMENT_ID aJptNetElemId, const NET_PCB::CONNECTION_PCB& aConnectionToIgnore ) -> int { - int jptsize = 0; + int jptsize = std::numeric_limits::max(); for( NET_PCB::CONNECTION_PCB connection : net.Connections ) { @@ -2382,7 +2382,8 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadNets() } } - if( jptsize == 0 ) + if( jptsize == std::numeric_limits::max() + && !aConnectionToIgnore.Route.RouteVertices.empty() ) { // aConnectionToIgnore is actually the only one that has a route, so lets use that // to determine junction size