diff --git a/eeschema/netlist_exporters/netlist_exporter_spice.cpp b/eeschema/netlist_exporters/netlist_exporter_spice.cpp index a95746a39e..d4d3eb9d97 100644 --- a/eeschema/netlist_exporters/netlist_exporter_spice.cpp +++ b/eeschema/netlist_exporters/netlist_exporter_spice.cpp @@ -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; }