From 27296b504325ea6d59dbc404fdc5df7963ea4d65 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 2 Oct 2022 17:37:02 +0100 Subject: [PATCH] Quote all bus members when writing to file. Fixes https://gitlab.com/kicad/code/kicad/issues/12447 --- eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp b/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp index 873fb00528..7a2ab12115 100644 --- a/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp +++ b/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp @@ -1201,9 +1201,19 @@ void SCH_SEXPR_PLUGIN::saveBusAlias( std::shared_ptr aAlias, int aNes { wxCHECK_RET( aAlias != nullptr, "BUS_ALIAS* is NULL" ); + wxString members; + + for( const wxString& member : aAlias->Members() ) + { + if( !members.IsEmpty() ) + members += wxS( " " ); + + members += m_out->Quotew( member ); + } + m_out->Print( aNestLevel, "(bus_alias %s (members %s))\n", m_out->Quotew( aAlias->GetName() ).c_str(), - TO_UTF8( boost::algorithm::join( aAlias->Members(), " " ) ) ); + TO_UTF8( members ) ); }