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
This commit is contained in:
jean-pierre charras 2018-06-21 12:30:38 +02:00
parent a552b4ccca
commit f634b75652
1 changed files with 3 additions and 3 deletions

View File

@ -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;