From cd3ecdfc785f8396905eb09f2ab8675e21c42430 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Mon, 8 Nov 2021 11:25:13 -0800 Subject: [PATCH] Fix sort to be irreflexive Switching the order of the parameters must switch the sort order (no <=) otherwise the sort is non-determinant and fails std::sort preconditions --- eeschema/sch_text.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp index 4506328ae6..c5d9431714 100644 --- a/eeschema/sch_text.cpp +++ b/eeschema/sch_text.cpp @@ -1253,7 +1253,7 @@ bool SCH_GLOBALLABEL::ResolveTextVar( wxString* token, int aDepth ) const std::sort( pageListCopy.begin(), pageListCopy.end(), []( const wxString& a, const wxString& b ) -> bool { - return StrNumCmp( a, b, true ) <= 0; + return StrNumCmp( a, b, true ) < 0; } ); if( !settings.m_IntersheetRefsListOwnPage )