]> www.ginac.de Git - ginac.git/blobdiff - ginac/symmetry.cpp
symmetry::calchash(): be careful to not dereference past-the-end iterator.
[ginac.git] / ginac / symmetry.cpp
index 9e00a8c843633fdfece0c0ab9715343a9ddd7e02..725506fa6fa5a8e4af653c9c647ff33ad020834e 100644 (file)
@@ -190,7 +190,8 @@ unsigned symmetry::calchash() const
 
        if (type == none) {
                v = rotate_left(v);
-               v ^= *(indices.begin());
+               if (!indices.empty())
+                       v ^= *(indices.begin());
        } else {
                for (exvector::const_iterator i=children.begin(); i!=children.end(); ++i)
                {