Pcbnew: fix bug opening P-CAD ASCII files. (fixes lp:1545668)

This commit is contained in:
Dick Hollenbeck 2016-02-18 11:33:11 -05:00 committed by Wayne Stambaugh
parent a773ecc735
commit 48e2addd69
1 changed files with 2 additions and 1 deletions

View File

@ -51,7 +51,8 @@ void LoadInputFile( wxString aFileName, wxXmlDocument* aXmlDoc )
// check file format
if( !fgets( line, sizeof( line ), fp )
|| strcmp( line, ACCEL_ASCII_KEYWORD ) )
// first line starts with "ACCEL_ASCII" with optional stuff on same line after that.
|| memcmp( line, ACCEL_ASCII_KEYWORD, sizeof(ACCEL_ASCII_KEYWORD)-1 ) )
THROW_IO_ERROR( "Unknown file type" );
// rewind the file