From: Christian Bauer Date: Fri, 27 Jul 2001 18:49:41 +0000 (+0000) Subject: - fixed a problem where (p\-m*ONE)*(p\-m*ONE) would be automatically simplified X-Git-Tag: release_0-9-2~13 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=9546e7613b679b28659b0774d2398ad92db26b61 - fixed a problem where (p\-m*ONE)*(p\-m*ONE) would be automatically simplified to complete nonsense... --- diff --git a/ginac/clifford.cpp b/ginac/clifford.cpp index 8687f969..f6a511c4 100644 --- a/ginac/clifford.cpp +++ b/ginac/clifford.cpp @@ -319,8 +319,10 @@ ex clifford::simplify_ncmul(const exvector & v) const // Remove equal adjacent gammas if (s.size() >= 2) { - exvector::iterator it = s.begin(), itend = s.end() - 1; - while (it != itend) { + exvector::iterator it, itend = s.end() - 1; + for (it = s.begin(); it != itend; ++it) { + if (!is_a(it[0])) + continue; ex & a = it[0]; ex & b = it[1]; if (is_a(a.op(0)) && is_a(b.op(0))) { @@ -341,7 +343,6 @@ ex clifford::simplify_ncmul(const exvector & v) const something_changed = true; } } - ++it; } }