From 050191460f2be645e0b6b54054b200fd9db7b0f7 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 13 May 2020 13:41:29 +0100 Subject: [PATCH] Check for empty bus vectors and allow backwards vector specs. Fixes https://gitlab.com/kicad/code/kicad/issues/4421 --- eeschema/sch_connection.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eeschema/sch_connection.cpp b/eeschema/sch_connection.cpp index 61486f7b8b..02542335fb 100644 --- a/eeschema/sch_connection.cpp +++ b/eeschema/sch_connection.cpp @@ -522,6 +522,11 @@ bool SCH_CONNECTION::ParseBusVector( const wxString& aBus, wxString* aName, if( braceNesting != 0 ) return false; + if( begin == end ) + return false; + else if( begin > end ) + std::swap( begin, end ); + if( aName ) *aName = prefix;