From 096af597992609be62ec1104fdee476e3065f2e4 Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Fri, 4 Apr 2014 17:48:37 +0200 Subject: [PATCH] Fix bug #784: Assert if assigning a product to a triangularView does not match the size. --- Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h b/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h index ffa871cae..225b994d1 100644 --- a/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +++ b/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h @@ -265,6 +265,8 @@ template template TriangularView& TriangularView::assignProduct(const ProductBase& prod, const Scalar& alpha) { + eigen_assert(m_matrix.rows() == prod.rows() && m_matrix.cols() == prod.cols()); + general_product_to_triangular_selector::run(m_matrix.const_cast_derived(), prod.derived(), alpha); return *this;