diff --git a/opm/core/linalg/LinearSolverIstl.cpp b/opm/core/linalg/LinearSolverIstl.cpp index e679dad0a..1871b8f8d 100644 --- a/opm/core/linalg/LinearSolverIstl.cpp +++ b/opm/core/linalg/LinearSolverIstl.cpp @@ -168,7 +168,7 @@ namespace Opm { // System RHS Vector b(opA.getmat().N()); - std::copy(rhs, rhs + size, b.begin()); + std::copy(rhs, rhs+b.size(), b.begin()); // System solution Vector x(opA.getmat().M()); x = 0.0;