From 1b831cccaee0179d4f4b6a601c1b713d70266271 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 3 May 2010 18:46:04 +0200 Subject: [PATCH] fixed recent minor bug in Cvpcb (footprint name error when read from netlist) --- cvpcb/readschematicnetlist.cpp | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/cvpcb/readschematicnetlist.cpp b/cvpcb/readschematicnetlist.cpp index aa38ff1190..6c954c0b90 100644 --- a/cvpcb/readschematicnetlist.cpp +++ b/cvpcb/readschematicnetlist.cpp @@ -90,7 +90,6 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist() { char alim[1024]; int idx, jj, k, l; - char* LibName; char cbuffer[BUFFER_CHAR_SIZE]; /* temporary storage */ char* ptchar; COMPONENT* Cmp; @@ -193,10 +192,8 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist() while( Line[idx] == ' ' ) idx++; - /* idx points the component value */ - LibName = Line + idx; - - /* Read value */ + /* idx points the component value. + * Read value */ ptchar = strstr( &Line[idx], " " ); // Search end of value field (space) if( ptchar == 0 ) { @@ -215,7 +212,9 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist() cbuffer[jj++] = Line[idx]; } cbuffer[jj] = 0; - Cmp->m_Module = CONV_FROM_UTF8(cbuffer); + // Copy footprint name: + if( m_isEESchemaNetlist && (strnicmp( cbuffer, "$noname", 7 ) != 0) ) + Cmp->m_Module = CONV_FROM_UTF8(cbuffer); if( (Line[++idx] == '(') && (Line[k - 1] == ')' ) ) { @@ -261,18 +260,6 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist() m_components.push_back( Cmp ); - if( m_isEESchemaNetlist ) /* copy footprint name: */ - { - if( strnicmp( LibName, "$noname", 7 ) != 0 ) - { - while( *LibName > ' ' ) - { - Cmp->m_Module.Append( *LibName ); - LibName++; - } - } - } - ReadPinConnection( netlistReader, Cmp ); }