mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fixed bug in SparseBlock which caused a segfault in sparse_extra_3 test
This commit is contained in:
@@ -466,10 +466,8 @@ namespace internal {
|
|||||||
inline GenericSparseBlockInnerIteratorImpl& operator++()
|
inline GenericSparseBlockInnerIteratorImpl& operator++()
|
||||||
{
|
{
|
||||||
// search next non-zero entry
|
// 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);
|
typename XprType::InnerIterator it(m_block.m_matrix, m_outerPos);
|
||||||
// search for the key m_innerIndex in the current outer-vector
|
// search for the key m_innerIndex in the current outer-vector
|
||||||
while(it && it.index() < m_innerIndex) ++it;
|
while(it && it.index() < m_innerIndex) ++it;
|
||||||
@@ -580,9 +578,8 @@ public:
|
|||||||
inline OuterVectorInnerIterator& operator++()
|
inline OuterVectorInnerIterator& operator++()
|
||||||
{
|
{
|
||||||
// search next non-zero entry
|
// 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);
|
EvalIterator it(m_eval.m_argImpl, m_outerPos);
|
||||||
// search for the key m_innerIndex in the current outer-vector
|
// search for the key m_innerIndex in the current outer-vector
|
||||||
while(it && it.index() < m_innerIndex) ++it;
|
while(it && it.index() < m_innerIndex) ++it;
|
||||||
|
|||||||
Reference in New Issue
Block a user