Check for empty bus vectors and allow backwards vector specs.

Fixes https://gitlab.com/kicad/code/kicad/issues/4421
This commit is contained in:
Jeff Young 2020-05-13 13:41:29 +01:00
parent ba301c292a
commit 050191460f
1 changed files with 5 additions and 0 deletions

View File

@ -522,6 +522,11 @@ bool SCH_CONNECTION::ParseBusVector( const wxString& aBus, wxString* aName,
if( braceNesting != 0 ) if( braceNesting != 0 )
return false; return false;
if( begin == end )
return false;
else if( begin > end )
std::swap( begin, end );
if( aName ) if( aName )
*aName = prefix; *aName = prefix;