diff --git a/gerbview/excellon_read_drill_file.cpp b/gerbview/excellon_read_drill_file.cpp index 8c7e439e16..976b6e64e6 100644 --- a/gerbview/excellon_read_drill_file.cpp +++ b/gerbview/excellon_read_drill_file.cpp @@ -259,7 +259,7 @@ bool EXCELLON_IMAGE::LoadFile( const wxString & aFullFileName ) char* line = excellonReader.Line(); char* text = StrPurge( line ); - if( *text == ';' ) // comment: skip line + if( *text == ';' || *text == 0 ) // comment or empty line: skip line continue; if( m_State == EXCELLON_IMAGE::READ_HEADER_STATE ) diff --git a/gerbview/readgerb.cpp b/gerbview/readgerb.cpp index c91c826779..cb3c9a36a5 100644 --- a/gerbview/readgerb.cpp +++ b/gerbview/readgerb.cpp @@ -206,9 +206,9 @@ bool GERBER_FILE_IMAGE::LoadGerberFile( const wxString& aFullFileName ) break; default: - text++; msg.Printf( wxT("Unexpected symbol <%c>"), *text ); AddMessageToList( msg ); + text++; break; } }