NETLIST_EXPORTER_SPICE: add space to the not allowed chars in netnames

Not allowed chars are replaced by '_'
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 66651327bd
commit be59e7d67f
1 changed files with 2 additions and 1 deletions

View File

@ -277,7 +277,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(), ')', '_' );
@ -287,6 +287,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;
}