Commit 1b831ccc authored by jean-pierre charras's avatar jean-pierre charras

fixed recent minor bug in Cvpcb (footprint name error when read from netlist)

parent 97ede2a6
...@@ -90,7 +90,6 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist() ...@@ -90,7 +90,6 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist()
{ {
char alim[1024]; char alim[1024];
int idx, jj, k, l; int idx, jj, k, l;
char* LibName;
char cbuffer[BUFFER_CHAR_SIZE]; /* temporary storage */ char cbuffer[BUFFER_CHAR_SIZE]; /* temporary storage */
char* ptchar; char* ptchar;
COMPONENT* Cmp; COMPONENT* Cmp;
...@@ -193,10 +192,8 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist() ...@@ -193,10 +192,8 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist()
while( Line[idx] == ' ' ) while( Line[idx] == ' ' )
idx++; idx++;
/* idx points the component value */ /* idx points the component value.
LibName = Line + idx; * Read value */
/* Read value */
ptchar = strstr( &Line[idx], " " ); // Search end of value field (space) ptchar = strstr( &Line[idx], " " ); // Search end of value field (space)
if( ptchar == 0 ) if( ptchar == 0 )
{ {
...@@ -215,7 +212,9 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist() ...@@ -215,7 +212,9 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist()
cbuffer[jj++] = Line[idx]; cbuffer[jj++] = Line[idx];
} }
cbuffer[jj] = 0; 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] == ')' ) ) if( (Line[++idx] == '(') && (Line[k - 1] == ')' ) )
{ {
...@@ -261,18 +260,6 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist() ...@@ -261,18 +260,6 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist()
m_components.push_back( Cmp ); 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 ); ReadPinConnection( netlistReader, Cmp );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment