7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 10:51:41 +00:00

Simulator: Fix line offset in intermediate ngspice file

- Fixes issue 
- Replace the hard coded line numbers
- Search for "Value:" string instead
This commit is contained in:
Lucas Gerads 2025-03-07 17:39:10 +01:00 committed by Jon Evans
parent 54be62b8fa
commit 313232c9f3

View File

@ -667,8 +667,13 @@ void KIBIS_PIN::getKuKdFromFile( const std::string& aSimul )
{
std::string line;
for( int i = 0; i < 11; i++ ) // number of line in the ngspice output header
std::getline( KuKdfile, line );
while( std::getline( KuKdfile, line ) ) // skip ngspice output header
{
if( line.find( "Values:" ) != std::string::npos )
{
break;
}
}
int i = 0;
double t_v, ku_v, kd_v;