Fix eeschema qa.

This commit is contained in:
Alex Shvartzkop
2026-01-23 12:13:29 +03:00
parent 2f8c1dc0f7
commit 06acabad05
+6 -6
View File
@@ -1675,16 +1675,13 @@ std::vector<wxString> ExpandStackedPinNotation( const wxString& aPinName, bool*
int CountStackedPinNotation( const wxString& aPinName, bool* aValid )
{
size_t len = aPinName.length();
if( !aValid )
{
// Fastest path when we're not interested in validity
size_t len = aPinName.length();
if( len < 3 )
return 1;
if( aPinName[0] != '[' || aPinName[len - 1] != ']' )
return 1;
}
else
{
@@ -1696,7 +1693,7 @@ int CountStackedPinNotation( const wxString& aPinName, bool* aValid )
if( hasOpenBracket || hasCloseBracket )
{
if( aPinName[0] != '[' || aPinName[aPinName.length() - 1] != ']' )
if( aPinName[0] != '[' || aPinName[len - 1] != ']' )
{
*aValid = false;
return 1;
@@ -1704,6 +1701,9 @@ int CountStackedPinNotation( const wxString& aPinName, bool* aValid )
}
}
if( aPinName[0] != '[' || aPinName[len - 1] != ']' )
return 1;
const wxString inner = aPinName.Mid( 1, aPinName.Length() - 2 );
int count = 0;