From f71418ace959514d5a2b635ef54da940c923ac52 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 4 Jul 2014 17:54:14 +0200 Subject: [PATCH] Pcbnew: fix read .kicad_pcb file error when an outdated plot parameter is found. Now outdated plot parameters are just ignored --- pcbnew/pcb_plot_params.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pcbnew/pcb_plot_params.cpp b/pcbnew/pcb_plot_params.cpp index c03acc51dd..1761ca493a 100644 --- a/pcbnew/pcb_plot_params.cpp +++ b/pcbnew/pcb_plot_params.cpp @@ -353,6 +353,8 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) if( token == T_pcbplotparams ) continue; + bool skip_right = false; + switch( token ) { case T_layerselection: @@ -502,10 +504,13 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) break; default: - skipCurrent(); + skipCurrent(); // skip unknown or outdated plot parameter + skip_right = true; // the closing right token is already read. break; } - NeedRIGHT(); + + if( ! skip_right ) + NeedRIGHT(); } }