diff --git a/Eigen/src/SparseCore/SparseMatrix.h b/Eigen/src/SparseCore/SparseMatrix.h index 849970a9b..fd92ab076 100644 --- a/Eigen/src/SparseCore/SparseMatrix.h +++ b/Eigen/src/SparseCore/SparseMatrix.h @@ -563,6 +563,8 @@ class SparseMatrix : public SparseCompressedBase= 0 && j < m_outerSize && "invalid outer index"); + eigen_assert(i >= 0 && i < m_innerSize && "invalid inner index"); Index start = m_outerIndex[j]; Index end = isCompressed() ? m_outerIndex[j + 1] : start + m_innerNonZeros[j]; Index dst = start == end ? end : m_data.searchLowerIndex(start, end, i);