From be59e7d67fa17d7b3f23808079915d5b34e58ddf Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 16 May 2023 17:59:01 +0200 Subject: [PATCH] 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 --- eeschema/netlist_exporters/netlist_exporter_spice.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eeschema/netlist_exporters/netlist_exporter_spice.cpp b/eeschema/netlist_exporters/netlist_exporter_spice.cpp index 4ef89f0662..2aa8358a38 100644 --- a/eeschema/netlist_exporters/netlist_exporter_spice.cpp +++ b/eeschema/netlist_exporters/netlist_exporter_spice.cpp @@ -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; }