Commit 30ecdbea authored by Dick Hollenbeck's avatar Dick Hollenbeck

fix infinite loop while generating drill file, bug introduced in 3419

parent 477e98dc
...@@ -62,6 +62,8 @@ void Build_Holes_List( BOARD* aPcb, ...@@ -62,6 +62,8 @@ void Build_Holes_List( BOARD* aPcb,
aHoleListBuffer.clear(); aHoleListBuffer.clear();
aToolListBuffer.clear(); aToolListBuffer.clear();
D(printf( "%s:\n", __FUNCTION__ );)
if( (aFirstLayer >= 0) && (aLastLayer >= 0) ) if( (aFirstLayer >= 0) && (aLastLayer >= 0) )
{ {
if( aFirstLayer > aLastLayer ) if( aFirstLayer > aLastLayer )
...@@ -72,9 +74,7 @@ void Build_Holes_List( BOARD* aPcb, ...@@ -72,9 +74,7 @@ void Build_Holes_List( BOARD* aPcb,
*/ */
if( ! aGenerateNPTH_list ) // vias are always plated ! if( ! aGenerateNPTH_list ) // vias are always plated !
{ {
TRACK* track = aPcb->m_Track; for( TRACK* track = aPcb->m_Track; track; track = track->Next() )
for( ; track != NULL; track = track->Next() )
{ {
if( track->Type() != PCB_VIA_T ) if( track->Type() != PCB_VIA_T )
continue; continue;
...@@ -112,7 +112,7 @@ void Build_Holes_List( BOARD* aPcb, ...@@ -112,7 +112,7 @@ void Build_Holes_List( BOARD* aPcb,
// build hole list for pads (assumed always through holes) // build hole list for pads (assumed always through holes)
if( !aExcludeThroughHoles || aGenerateNPTH_list ) if( !aExcludeThroughHoles || aGenerateNPTH_list )
{ {
for( MODULE* module = aPcb->m_Modules; module; module->Next() ) for( MODULE* module = aPcb->m_Modules; module; module = module->Next() )
{ {
// Read and analyse pads // Read and analyse pads
for( D_PAD* pad = module->m_Pads; pad; pad = pad->Next() ) for( D_PAD* pad = module->m_Pads; pad; pad = pad->Next() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment