diff options
author | 2014-10-30 21:34:10 +0100 | |
---|---|---|
committer | 2014-10-30 21:34:10 +0100 | |
commit | 4ec2f07a5bfc17bc98882ccfde7065d42b3a728c (patch) | |
tree | 71a985319626b586045956e98d7bc67302421587 /Eigen/src/SparseCore | |
parent | 883168ed94ca2559231861957558a9ded13e4831 (diff) |
Fixed bug in SparseBlock which caused a segfault in sparse_extra_3 test
Diffstat (limited to 'Eigen/src/SparseCore')
-rw-r--r-- | Eigen/src/SparseCore/SparseBlock.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Eigen/src/SparseCore/SparseBlock.h b/Eigen/src/SparseCore/SparseBlock.h index f8b9d5ad6..9e4da2057 100644 --- a/Eigen/src/SparseCore/SparseBlock.h +++ b/Eigen/src/SparseCore/SparseBlock.h @@ -466,10 +466,8 @@ namespace internal { inline GenericSparseBlockInnerIteratorImpl& operator++()
{
// search next non-zero entry
- while(m_outerPos<m_end)
+ while(++m_outerPos<m_end)
{
- m_outerPos++;
- if(m_outerPos==m_end) break;
typename XprType::InnerIterator it(m_block.m_matrix, m_outerPos);
// search for the key m_innerIndex in the current outer-vector
while(it && it.index() < m_innerIndex) ++it;
@@ -580,9 +578,8 @@ public: inline OuterVectorInnerIterator& operator++()
{
// search next non-zero entry
- while(m_outerPos<m_end)
+ while(++m_outerPos<m_end)
{
- m_outerPos++;
EvalIterator it(m_eval.m_argImpl, m_outerPos);
// search for the key m_innerIndex in the current outer-vector
while(it && it.index() < m_innerIndex) ++it;
|