NETLIST_EXPORTER_SPICE: add missing switch to "C" locale (missing LOCALE_IO).

It breaks spice netlist in countries using a comma as floating number separator.
This commit is contained in:
jean-pierre charras 2022-10-19 11:50:35 +02:00
parent b9b5a66bfb
commit c4db7337d0
1 changed files with 4 additions and 2 deletions

View File

@ -48,7 +48,7 @@
#include <pegtl.hpp>
#include <pegtl/contrib/parse_tree.hpp>
#include <wx/dir.h>
#include <locale_io.h>
namespace NETLIST_EXPORTER_SPICE_PARSER
{
@ -110,6 +110,8 @@ bool NETLIST_EXPORTER_SPICE::WriteNetlist( const wxString& aOutFileName, unsigne
bool NETLIST_EXPORTER_SPICE::DoWriteNetlist( OUTPUTFORMATTER& aFormatter, unsigned aNetlistOptions )
{
LOCALE_IO dummy;
// Cleanup list to avoid duplicate if the netlist exporter is run more than once.
m_rawIncludes.clear();
@ -229,7 +231,7 @@ bool NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries( unsigned aNetlistOptions
}
catch( const IO_ERROR& e )
{
DisplayErrorMessage( nullptr,
DisplayErrorMessage( nullptr,
wxString::Format( "Failed reading model from symbol '%s':\n%s",
symbol->GetRef( &sheet ),
e.What() ) );