From 24e9ebb40a47ed674b896176c89b83353b4f18a5 Mon Sep 17 00:00:00 2001 From: Roland Kaminski Date: Wed, 13 Dec 2023 21:40:47 +0100 Subject: [PATCH] fix sorting of terms --- libgringo/src/term.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgringo/src/term.cc b/libgringo/src/term.cc index 91d7d2e40..9408fe890 100644 --- a/libgringo/src/term.cc +++ b/libgringo/src/term.cc @@ -372,7 +372,7 @@ void IESolver::add(IE ie, bool ignoreIfFixed) { std::sort( terms.begin(), terms.end(), [](auto const &a, auto const &b) { - return a.variable->name == b.variable->name; + return a.variable->name < b.variable->name; }); // combine adjacent terms referring to the same variable