Commit 028b0bd3 authored by Wayne Stambaugh's avatar Wayne Stambaugh

Fix board parsing error when module name is empty. (fixes lp:1226546)

parent 0224bc2f
......@@ -1540,17 +1540,19 @@ MODULE* PCB_PARSER::parseMODULE( wxArrayString* aInitialComments ) throw( IO_ERR
wxCHECK_MSG( CurTok() == T_module, NULL,
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as MODULE." ) );
wxPoint pt;
T token;
FPID fpid;
wxString name;
wxPoint pt;
T token;
FPID fpid;
auto_ptr< MODULE > module( new MODULE( m_board ) );
module->SetInitialComments( aInitialComments );
NeedSYMBOLorNUMBER();
name = FromUTF8();
if( fpid.Parse( FromUTF8() ) >= 0 )
if( !name.IsEmpty() && fpid.Parse( FromUTF8() ) >= 0 )
{
wxString error;
error.Printf( _( "invalid PFID in\nfile: <%s>\nline: %d\noffset: %d" ),
......
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