]> www.ginac.de Git - ginac.git/commitdiff
Fixed bug in basic::subs_one_level.
authorJens Vollinga <vollinga@thep.physik.uni-mainz.de>
Mon, 25 Oct 2004 12:13:49 +0000 (12:13 +0000)
committerJens Vollinga <vollinga@thep.physik.uni-mainz.de>
Mon, 25 Oct 2004 12:13:49 +0000 (12:13 +0000)
ginac/basic.cpp

index c37ed3e3ded529a816ab82189da3f6fd42deeafa..b545d7aa13e53eeb7ecc72a0cdefd9c4502861c5 100644 (file)
@@ -617,9 +617,11 @@ ex basic::subs_one_level(const exmap & m, unsigned options) const
        exmap::const_iterator it;
 
        if (options & subs_options::no_pattern) {
        exmap::const_iterator it;
 
        if (options & subs_options::no_pattern) {
-               it = m.find(*this);
+               ex thisex = *this;
+               it = m.find(thisex);
                if (it != m.end())
                        return it->second;
                if (it != m.end())
                        return it->second;
+               return thisex;
        } else {
                for (it = m.begin(); it != m.end(); ++it) {
                        lst repl_lst;
        } else {
                for (it = m.begin(); it != m.end(); ++it) {
                        lst repl_lst;