eeschema: workaround for 64kByte string length limit in wxString::Format() causing segfaults in netlist update under Windows
Fixes: lp:1754402 * https://bugs.launchpad.net/kicad/+bug/1754402
This commit is contained in:
parent
ab37801489
commit
b1f613071d
|
@ -384,7 +384,7 @@ bool KIWAY::PlayersClose( bool doForce )
|
|||
|
||||
|
||||
void KIWAY::ExpressMail( FRAME_T aDestination,
|
||||
MAIL_T aCommand, const std::string& aPayload, wxWindow* aSource )
|
||||
MAIL_T aCommand, std::string aPayload, wxWindow* aSource )
|
||||
{
|
||||
KIWAY_EXPRESS mail( aDestination, aCommand, aPayload, aSource );
|
||||
|
||||
|
|
|
@ -907,13 +907,12 @@ void SCH_EDIT_FRAME::doUpdatePcb( const wxString& aUpdateOptions )
|
|||
|
||||
exporter.Format( &formatter, GNL_ALL );
|
||||
|
||||
// Copy the netlist in a static string, to have a long life time
|
||||
// and giving to Pcbnew the time to analyze this netlist:
|
||||
static std::string netlist_string;
|
||||
netlist_string = wxString::Format("%s\n%s", aUpdateOptions, formatter.GetString() ).ToStdString();
|
||||
auto updateOptions = aUpdateOptions.ToStdString();
|
||||
auto netlistString = formatter.GetString();
|
||||
auto finalNetlist = updateOptions + "\n" + netlistString;
|
||||
|
||||
// Now, send the "kicad" (s-expr) netlist to Pcbnew
|
||||
Kiway().ExpressMail( FRAME_PCB, MAIL_SCH_PCB_UPDATE, netlist_string, this );
|
||||
Kiway().ExpressMail( FRAME_PCB, MAIL_SCH_PCB_UPDATE, finalNetlist, this );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -344,7 +344,7 @@ public:
|
|||
* aCommand in there.
|
||||
*/
|
||||
VTBL_ENTRY void ExpressMail( FRAME_T aDestination, MAIL_T aCommand,
|
||||
const std::string& aPayload, wxWindow* aSource = NULL );
|
||||
std::string aPayload, wxWindow* aSource = NULL );
|
||||
|
||||
/**
|
||||
* Function Prj
|
||||
|
|
Loading…
Reference in New Issue