Fix irreflexive comparator in cvpcb auto-association sort

sortListbyCmpValue used >= 0, which returns true when comparing
equal elements (Cmp returns 0 for equal strings). This violates
the irreflexivity requirement of strict weak ordering, causing
undefined behavior in std::sort.
This commit is contained in:
Seth Hillbrand
2026-02-19 07:47:29 -08:00
parent 3d2235f97a
commit 788716490a
+1 -1
View File
@@ -72,7 +72,7 @@ wxString GetQuotedText( wxString& text )
// (m_ComponentValue member)
bool sortListbyCmpValue( const FOOTPRINT_EQUIVALENCE& ref, const FOOTPRINT_EQUIVALENCE& test )
{
return ref.m_ComponentValue.Cmp( test.m_ComponentValue ) >= 0;
return ref.m_ComponentValue.Cmp( test.m_ComponentValue ) > 0;
}