Browse Source

.kicad_sym files: Fix an issue when a symbol name contains a double quote.

This char (accepted in dialog) was escaped in some places, but not all.
So if a symbol name contained a double quote, the lib file was broken.
6.0.7
jean-pierre charras 5 years ago
parent
commit
993a684959
  1. 7
      eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp

7
eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp

@ -1605,8 +1605,11 @@ void SCH_SEXPR_PLUGIN_CACHE::SaveSymbol( LIB_PART* aSymbol, OUTPUTFORMATTER& aFo
for( auto unit : units )
{
aFormatter.Print( aNestLevel + 1, "(symbol \"%s_%d_%d\"\n",
unitName.c_str(), unit.m_unit, unit.m_convert );
name = aFormatter.Quotew( unitName ); // Add quotes and escape chars like ")
name.pop_back(); // Remove last char: the quote ending the string.
aFormatter.Print( aNestLevel + 1, "(symbol \%s_%d_%d\"\n",
name.c_str(), unit.m_unit, unit.m_convert );
for( auto item : unit.m_items )
saveSymbolDrawItem( item, aFormatter, aNestLevel + 2 );

Loading…
Cancel
Save