mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-03 10:40:39 +08:00
Fixed bug in SparseBlock which caused a segfault in sparse_extra_3 test
This commit is contained in:
parent
883168ed94
commit
4ec2f07a5b
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user