]> www.ginac.de Git - ginac.git/commitdiff
Fixed a bug in the code for subsitutions in indexed expressions.
authorJens Vollinga <jens.vollinga@googlemail.com>
Fri, 22 Jul 2011 21:27:37 +0000 (23:27 +0200)
committerJens Vollinga <jens.vollinga@googlemail.com>
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 ab14b555d1681d312bc6de93522dbbfb6e46aea7..7c6e5223653889730407aa0fd5a246417cc06f6d 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())
 {
        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
        else if ((options & subs_options::algebraic) && is_exactly_a<mul>(*this))
                return static_cast<const mul *>(this)->algebraic_subs_mul(m, options);
        else