]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix a bug which seems has never occured (or I didn't note it...).
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 8 Jun 1998 01:05:36 +0000 (01:05 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 8 Jun 1998 01:05:36 +0000 (01:05 +0000)
git-svn-id: https://svn.dealii.org/trunk@384 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/dsmatrix.cc

index f1109d6bf160b2dda3a15b397bd1bc446e54e5cf..77b5b7bf82bc57fa8548ef27e2af14df951d5880 100644 (file)
@@ -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<signed int>(j));
-  if (*p == static_cast<signed int>(j))
+  if ((*p == static_cast<signed int>(j)) &&
+      (p != &colnums[rowstart[i+1]]))
     return (p - &colnums[0]);
   else
     return -1;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.