Browse Source

Don't re-read tokens on error

If the data were empty, there is no token, so curTok will represent the
right paren, not the next token

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20301

(cherry picked from commit d2550138bc)
revert-0c36e162
Seth Hillbrand 7 months ago
parent
commit
e6843cde64
  1. 6
      common/embedded_files.cpp

6
common/embedded_files.cpp

@ -390,8 +390,10 @@ void EMBEDDED_FILES_PARSER::ParseEmbedded( EMBEDDED_FILES* aFiles )
catch( const PARSE_ERROR& e )
{
// No data in the file -- due to bug in writer for 9.0.0
NeedRIGHT();
break;
if( curTok == T_RIGHT )
break;
else
throw e;
}
catch( ... )
{

Loading…
Cancel
Save