From 2a1dad27939149b1ca14ddf31ff9aeab4bfff7f1 Mon Sep 17 00:00:00 2001 From: Simon Sticko Date: Thu, 6 Feb 2020 09:32:32 +0100 Subject: [PATCH] Add an assert on row index in SparseMatrix::add(..) --- include/deal.II/lac/sparse_matrix.templates.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/deal.II/lac/sparse_matrix.templates.h b/include/deal.II/lac/sparse_matrix.templates.h index 1e81b55c16..b5e6f925ac 100644 --- a/include/deal.II/lac/sparse_matrix.templates.h +++ b/include/deal.II/lac/sparse_matrix.templates.h @@ -541,6 +541,7 @@ SparseMatrix::add(const size_type row, const bool col_indices_are_sorted) { Assert(cols != nullptr, ExcNotInitialized()); + AssertIndexRange(row, m()); // if we have sufficiently many columns // and sorted indices it is faster to -- 2.39.5