Eagle plugin: avoid hanging if an unexpected keyword is found.

Fixes: lp:1701672
https://bugs.launchpad.net/kicad/+bug/1701672
This commit is contained in:
jean-pierre charras 2017-07-01 16:59:07 +02:00
parent c311e63f0d
commit 1c5ace4b7a
1 changed files with 9 additions and 0 deletions

View File

@ -824,7 +824,12 @@ void EAGLE_PLUGIN::loadElements( wxXmlNode* aElements )
while( element )
{
if( element->GetName() != "element" )
{
wxLogMessage( "expected: <element> read <%s>. Skip it", element->GetName() );
// Get next item
element = element->GetNext();
continue;
}
EELEMENT e( element );
@ -909,7 +914,11 @@ void EAGLE_PLUGIN::loadElements( wxXmlNode* aElements )
while( attribute )
{
if( attribute->GetName() != "attribute" )
{
wxLogMessage( "expected: <attribute> read <%s>. Skip it", attribute->GetName() );
attribute = attribute->GetNext();
continue;
}
EATTR a( attribute );