From 4e91a78aac3ca5b4e93e11aaa064c1f9ddd3be2f Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Thu, 2 Apr 2009 21:46:07 +0000 Subject: [PATCH] storage.hpp: fix #2891, now check new size instead of old one --- include/boost/numeric/ublas/storage.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/numeric/ublas/storage.hpp b/include/boost/numeric/ublas/storage.hpp index a2d9b315..ba176c41 100644 --- a/include/boost/numeric/ublas/storage.hpp +++ b/include/boost/numeric/ublas/storage.hpp @@ -340,12 +340,12 @@ namespace boost { namespace numeric { namespace ublas { // Resizing BOOST_UBLAS_INLINE void resize (size_type size) { - BOOST_UBLAS_CHECK (size_ <= N, bad_size ()); + BOOST_UBLAS_CHECK (size <= N, bad_size ()); size_ = size; } BOOST_UBLAS_INLINE void resize (size_type size, value_type init) { - BOOST_UBLAS_CHECK (size_ <= N, bad_size ()); + BOOST_UBLAS_CHECK (size <= N, bad_size ()); if (size > size_) std::fill (data_ + size_, data_ + size, init); size_ = size;