Bug fix for tensor::replace_contr_index().
authorJens Vollinga <vollinga@thep.physik.uni-mainz.de>
Tue, 12 Dec 2006 21:58:51 +0000 (21:58 +0000)
committerJens Vollinga <vollinga@thep.physik.uni-mainz.de>
Tue, 12 Dec 2006 21:58:51 +0000 (21:58 +0000)
ginac/tensor.cpp

index c215237d85f9d1225913b7fff4f87e59e0bc8134..25935f420b3e49ee8ba9ea1df612373baa10e425 100644 (file)
@@ -395,6 +395,8 @@ bool tensor::replace_contr_index(exvector::iterator self, exvector::iterator oth
 again:
        if (self_idx->is_symbolic()) {
                for (size_t i=1; i<other->nops(); i++) {
+                       if (! is_a<idx>(other->op(i)))
+                               continue;
                        const idx &other_idx = ex_to<idx>(other->op(i));
                        if (is_dummy_pair(*self_idx, other_idx)) {