NETLIST_EXPORTER_SPICE: add space to the not allowed chars in netnames

Not allowed chars are replaced by '_'
From master branch
Fixes #14724
https://gitlab.com/kicad/code/kicad/issues/14724
This commit is contained in:
jean-pierre charras 2023-05-16 17:59:01 +02:00
parent 2ea59ac83a
commit df698b9433
1 changed files with 2 additions and 1 deletions

View File

@ -278,7 +278,7 @@ void NETLIST_EXPORTER_SPICE::ConvertToSpiceMarkup( std::string& aNetName )
convertMarkup( root );
// Remove ngspice-disallowed chars
// Replace all ngspice-disallowed chars in netnames by a '_'
std::replace( converted.begin(), converted.end(), '%', '_' );
std::replace( converted.begin(), converted.end(), '(', '_' );
std::replace( converted.begin(), converted.end(), ')', '_' );
@ -288,6 +288,7 @@ void NETLIST_EXPORTER_SPICE::ConvertToSpiceMarkup( std::string& aNetName )
std::replace( converted.begin(), converted.end(), '<', '_' );
std::replace( converted.begin(), converted.end(), '>', '_' );
std::replace( converted.begin(), converted.end(), '~', '_' );
std::replace( converted.begin(), converted.end(), ' ', '_' );
aNetName = converted;
}