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

(cherry picked from commit d862cdaa72)
This commit is contained in:
Seth Hillbrand 2019-09-21 08:15:08 -07:00
parent 8be9aeac9f
commit bba949c04d
1 changed files with 6 additions and 1 deletions

View File

@ -1875,8 +1875,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)