diff --git a/pcbnew/pcad2kicadpcb_plugin/s_expr_loader.cpp b/pcbnew/pcad2kicadpcb_plugin/s_expr_loader.cpp index 49e966384b..19ec21db8a 100644 --- a/pcbnew/pcad2kicadpcb_plugin/s_expr_loader.cpp +++ b/pcbnew/pcad2kicadpcb_plugin/s_expr_loader.cpp @@ -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