Fix crash due to extra right parens in pcad files

Fixes sentry KICAD-TA
This commit is contained in:
Marek Roszko 2023-04-11 21:52:39 -04:00
parent ed94bc4bf9
commit 37eaa29679
1 changed files with 4 additions and 0 deletions

View File

@ -70,6 +70,10 @@ static const char ACCEL_ASCII_KEYWORD[] = "ACCEL_ASCII";
if( tok == DSN_RIGHT )
{
iNode = iNode->GetParent();
// this will happen if there are more right parens than left
if( !iNode )
THROW_IO_ERROR( wxT( "Unexpected right paren" ) );
}
else if( tok == DSN_LEFT )
{