pcbnew: properly close tags when handling bad poly

The parenthesis depth is 2 when the polygon isn't closed.  This
shouldn't happen but we have the fall-through to handle odd cases

Fixes: lp:1844872
* https://bugs.launchpad.net/kicad/+bug/1844872
This commit is contained in:
Seth Hillbrand 2019-09-21 08:15:08 -07:00
parent 4f57de9688
commit d862cdaa72
1 changed files with 6 additions and 1 deletions

View File

@ -1775,8 +1775,13 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const
}
if( !is_closed ) // Should not happen, but...
m_out->Print( aNestLevel+1, ")\n" );
{
if( newLine != 0 )
m_out->Print( 0, "\n" );
m_out->Print( aNestLevel+2, ")\n" );
m_out->Print( aNestLevel+1, ")\n" );
}
}
// Save the PolysList (filled areas)