Eagle SCH import: validate imported symbol names

Fixes: lp:1753189
* https://bugs.launchpad.net/kicad/+bug/1753189
This commit is contained in:
Maciej Suminski 2018-05-29 09:28:28 +02:00
parent e789523632
commit 94f161b8c2
1 changed files with 4 additions and 0 deletions

View File

@ -1064,6 +1064,7 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode )
wxString gatename = epart->deviceset + epart->device + einstance.gate;
wxString symbolname = wxString( epart->deviceset + epart->device );
symbolname.Replace( "*", "" );
LIB_ALIAS::ValidateName( symbolname );
int unit = m_eagleLibs[libraryname].GateUnit[gatename];
@ -1083,7 +1084,10 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode )
m_properties.get() );
if( !alias || !alias->GetPart() )
{
wxLogMessage( wxString::Format( _( "Could not find %s in the imported library" ), kisymbolname ) );
return;
}
LIB_PART* part = alias->GetPart();
LIB_ID libId( getLibName(), kisymbolname );