Fix Bug #1545668 (Pcbnew can't open P-CAD ASCII files)

This commit is contained in:
unknown 2016-02-17 16:38:30 +01:00 committed by jean-pierre charras
parent 0ac8aad082
commit 78d0cfc1a4
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