[PATCH 4/6] symmetry::calchash(): be careful to not dereference past-the-end iterator.
8 Aug
2009
8 Aug
'09
12:07 p.m.
--- ginac/symmetry.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/ginac/symmetry.cpp b/ginac/symmetry.cpp index 9e00a8c..725506f 100644 --- a/ginac/symmetry.cpp +++ b/ginac/symmetry.cpp @@ -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) { -- 1.6.3.3
5804
Age (days ago)
5804
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexei Sheplyakov