← Back to team overview

kicad-developers team mailing list archive

PATCH: minor bug fix in IDF parser

 

The attached patch fixes a logic defect in the IDF parser in which a valid
IDF component outline is rejected if the .END_ELECTRICAL (or
.END_MECHANICAL) statement was followed by an end-of-file rather than an
end-of-line.
=== modified file 'utils/idftools/idf_outlines.cpp'
--- utils/idftools/idf_outlines.cpp	2015-05-28 07:20:43 +0000
+++ utils/idftools/idf_outlines.cpp	2016-01-12 03:54:08 +0000
@@ -3320,7 +3320,7 @@
     // check RECORD 4
     while( aLibFile.good() && !FetchIDFLine( aLibFile, iline, comment, pos ) );
 
-    if( ( !aLibFile.good() && aLibFile.eof() ) || iline.empty() )
+    if( ( !aLibFile.good() && aLibFile.eof() ) && iline.empty() )
     {
         ostringstream ostr;
 


Follow ups