From f634b7565248301e7b624edca6a00800c0c2c694 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 21 Jun 2018 12:30:38 +0200 Subject: [PATCH] Pcbnew, plot parameters: fix an issue for the "outputdirectory" parameter. When the outputdirectory string was similar to a number, the .kicad_pcb file was no longer loadable. Fixes: lp:1777957 https://bugs.launchpad.net/kicad/+bug/1777957 --- pcbnew/pcb_plot_params.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pcbnew/pcb_plot_params.cpp b/pcbnew/pcb_plot_params.cpp index 2562bef562..33f3b99beb 100644 --- a/pcbnew/pcb_plot_params.cpp +++ b/pcbnew/pcb_plot_params.cpp @@ -220,8 +220,8 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter, m_drillMarks ); aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_scaleselection ), m_scaleSelection ); - aFormatter->Print( aNestLevel+1, "(%s %s)", getTokenName( T_outputdirectory ), - aFormatter->Quotew( m_outputDirectory ).c_str() ); + aFormatter->Print( aNestLevel+1, "(%s \"%s\")", getTokenName( T_outputdirectory ), + (const char*) m_outputDirectory.utf8_str() ); aFormatter->Print( 0, ")\n" ); } @@ -518,7 +518,7 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) break; case T_outputdirectory: - NeedSYMBOL(); + NeedSYMBOLorNUMBER(); // a dir name can be like a number aPcbPlotParams->m_outputDirectory = FROM_UTF8( CurText() ); break;