From 484bc8344ccfe3879b85002e5ec47d91bc6c1a8a Mon Sep 17 00:00:00 2001 From: Andrew Zonenberg Date: Wed, 13 Aug 2014 16:57:22 -0400 Subject: [PATCH] Fix a c_str() to wxString conversion memory overflow bug. --- pcbnew/netlist.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index 8ba8627385..83af0a98a9 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -242,8 +242,8 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) { msg.Printf( _( "* Warning: component '%s' has footprint '%s' and should be '%s'\n" ), GetChars( component->GetReference() ), - fpOnBoard->GetFPID().GetFootprintName().c_str(), - component->GetFPID().GetFootprintName().c_str() ); + GetChars( fpOnBoard->GetFPID().GetFootprintName() ), + GetChars( component->GetFPID().GetFootprintName() ) ); aReporter->Report( msg ); } @@ -272,7 +272,7 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) msg.Printf( _( "*** Warning: Component '%s' footprint ID '%s' is not " "valid. ***\n" ), GetChars( component->GetReference() ), - component->GetFPID().GetFootprintName().c_str() ); + GetChars( component->GetFPID().GetFootprintName() ) ); aReporter->Report( msg ); } @@ -294,7 +294,7 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) msg.Printf( _( "*** Warning: component '%s' footprint '%s' was not found in " "any libraries in the footprint library table. ***\n" ), GetChars( component->GetReference() ), - component->GetFPID().GetFootprintName().c_str() ); + GetChars( component->GetFPID().GetFootprintName() ) ); aReporter->Report( msg ); }