Fix Bug #1545668 (Pcbnew can't open P-CAD ASCII files)
This commit is contained in:
parent
0ac8aad082
commit
78d0cfc1a4
|
@ -51,7 +51,8 @@ void LoadInputFile( wxString aFileName, wxXmlDocument* aXmlDoc )
|
||||||
|
|
||||||
// check file format
|
// check file format
|
||||||
if( !fgets( line, sizeof( line ), fp )
|
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" );
|
THROW_IO_ERROR( "Unknown file type" );
|
||||||
|
|
||||||
// rewind the file
|
// rewind the file
|
||||||
|
|
Loading…
Reference in New Issue