Fixed a bug in the code for subsitutions in indexed expressions.
Jens Vollinga [Fri, 22 Jul 2011 21:27:37 +0000 (23:27 +0200)]
subs_options::no_index_renaming was ignored.
Thanks to Gerhard Hejc for reporting and suggesting a fix.

ginac/expairseq.cpp

index ab14b55..7c6e522 100644 (file)
@@ -453,7 +453,7 @@ ex expairseq::subs(const exmap & m, unsigned options) const
 {
        std::auto_ptr<epvector> vp = subschildren(m, options);
        if (vp.get())
-               return ex_to<basic>(thisexpairseq(vp, overall_coeff, true));
+               return ex_to<basic>(thisexpairseq(vp, overall_coeff, (options & subs_options::no_index_renaming) == 0));
        else if ((options & subs_options::algebraic) && is_exactly_a<mul>(*this))
                return static_cast<const mul *>(this)->algebraic_subs_mul(m, options);
        else