Skip to content
Snippets Groups Projects
Commit bcf14428 authored by Fons Rademakers's avatar Fons Rademakers
Browse files

From Anar:

fix in TObjArrayIter, fCurCursor was not properly initialized. Fixes crash
seen in stressIterator.


git-svn-id: http://root.cern.ch/svn/root/trunk@23265 27541ba8-7e3a-0410-8455-c3a389f83636
parent e4726436
Branches
Tags
No related merge requests found
...@@ -741,6 +741,7 @@ TObjArrayIter::TObjArrayIter(const TObjArrayIter &iter) : TIterator(iter) ...@@ -741,6 +741,7 @@ TObjArrayIter::TObjArrayIter(const TObjArrayIter &iter) : TIterator(iter)
fArray = iter.fArray; fArray = iter.fArray;
fDirection = iter.fDirection; fDirection = iter.fDirection;
fCursor = iter.fCursor; fCursor = iter.fCursor;
fCurCursor = iter.fCurCursor;
} }
//______________________________________________________________________________ //______________________________________________________________________________
...@@ -753,6 +754,7 @@ TIterator &TObjArrayIter::operator=(const TIterator &rhs) ...@@ -753,6 +754,7 @@ TIterator &TObjArrayIter::operator=(const TIterator &rhs)
fArray = rhs1.fArray; fArray = rhs1.fArray;
fDirection = rhs1.fDirection; fDirection = rhs1.fDirection;
fCursor = rhs1.fCursor; fCursor = rhs1.fCursor;
fCurCursor = rhs1.fCurCursor;
} }
return *this; return *this;
} }
...@@ -766,6 +768,7 @@ TObjArrayIter &TObjArrayIter::operator=(const TObjArrayIter &rhs) ...@@ -766,6 +768,7 @@ TObjArrayIter &TObjArrayIter::operator=(const TObjArrayIter &rhs)
fArray = rhs.fArray; fArray = rhs.fArray;
fDirection = rhs.fDirection; fDirection = rhs.fDirection;
fCursor = rhs.fCursor; fCursor = rhs.fCursor;
fCurCursor = rhs.fCurCursor;
} }
return *this; return *this;
} }
...@@ -804,6 +807,8 @@ void TObjArrayIter::Reset() ...@@ -804,6 +807,8 @@ void TObjArrayIter::Reset()
fCursor = 0; fCursor = 0;
else else
fCursor = fArray->Capacity() - 1; fCursor = fArray->Capacity() - 1;
fCurCursor = fCursor;
} }
//______________________________________________________________________________ //______________________________________________________________________________
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment