From: Christian Bauer Date: Mon, 22 Jul 2002 20:33:13 +0000 (+0000) Subject: synced to 1.0 X-Git-Tag: release_1-1-0~84 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?a=commitdiff_plain;h=58b1160aa40d2fb839dd9f34c73dc15358a3563a;p=ginac.git synced to 1.0 --- diff --git a/ginac/symmetry.cpp b/ginac/symmetry.cpp index 78dd75cf..d48ed3f1 100644 --- a/ginac/symmetry.cpp +++ b/ginac/symmetry.cpp @@ -305,7 +305,7 @@ public: int canonicalize(exvector::iterator v, const symmetry &symm) { - // Less than two indices? Then do nothing + // Less than two elements? Then do nothing if (symm.indices.size() < 2) return INT_MAX; @@ -335,6 +335,8 @@ int canonicalize(exvector::iterator v, const symmetry &symm) case symmetry::antisymmetric: // Sort the children in ascending order, keeping track of the signum sign *= permutation_sign(first, last, sy_is_less(v), sy_swap(v, something_changed)); + if (sign == 0) + return 0; break; case symmetry::cyclic: // Permute the smallest child to the front