From e5c1959dcddebb9c4cbfa3554678ba71e38410bb Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 27 Nov 2012 06:42:28 -0600 Subject: [PATCH] Fix dangling open file introduced as recent workaround --- pcbnew/netlist_reader_firstformat.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/pcbnew/netlist_reader_firstformat.cpp b/pcbnew/netlist_reader_firstformat.cpp index 916e553386..2b6f93bd43 100644 --- a/pcbnew/netlist_reader_firstformat.cpp +++ b/pcbnew/netlist_reader_firstformat.cpp @@ -80,15 +80,10 @@ bool NETLIST_READER::ReadOldFmtdNetList( FILE* aFile ) /* First, read the netlist: Build the list of footprints found in netlist */ -#ifndef __WXMAC__ // netlineReader dtor will close aFile - FILE_LINE_READER netlineReader( aFile, m_netlistFullName ); -#else - //Seems that the setvbuf call destroys the FILE buffer (already allocated) - //And looses the first 4096 bytes so we set doOwn => false - FILE_LINE_READER netlineReader( aFile, m_netlistFullName, false ); -#endif - COMPONENT_INFO *curComponent = NULL; + FILE_LINE_READER netlineReader( aFile, m_netlistFullName ); + COMPONENT_INFO* curComponent = NULL; + while( netlineReader.ReadLine() ) { char* line = StrPurge( netlineReader.Line() );