From: Wolfgang Bangerth Date: Mon, 8 Jun 1998 01:05:36 +0000 (+0000) Subject: Fix a bug which seems has never occured (or I didn't note it...). X-Git-Tag: v8.0.0~22870 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f94e219caec9c6d23838e60ec5ea5736950f9db;p=dealii.git Fix a bug which seems has never occured (or I didn't note it...). git-svn-id: https://svn.dealii.org/trunk@384 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/source/dsmatrix.cc b/deal.II/lac/source/dsmatrix.cc index f1109d6bf1..77b5b7bf82 100644 --- a/deal.II/lac/source/dsmatrix.cc +++ b/deal.II/lac/source/dsmatrix.cc @@ -235,7 +235,8 @@ dSMatrixStruct::operator () (const unsigned int i, const unsigned int j) const const int* p = lower_bound (&colnums[rowstart[i]+1], &colnums[rowstart[i+1]], static_cast(j)); - if (*p == static_cast(j)) + if ((*p == static_cast(j)) && + (p != &colnums[rowstart[i+1]])) return (p - &colnums[0]); else return -1;