|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r54231 - trunk/boost/numeric/ublas
From: guwi17_at_[hidden]
Date: 2009-06-22 16:58:30
Author: guwi17
Date: 2009-06-22 16:58:30 EDT (Mon, 22 Jun 2009)
New Revision: 54231
URL: http://svn.boost.org/trac/boost/changeset/54231
Log:
matrix_sparse.hpp - see #2195, fixed compressed_matrix::erase_element(); must use >= instead of > because the last element of index1_data is the "end of list" marker. Segfault was caused by *(itv + 1) which pointed to an element _after_ index1_data.end()
Text files modified:
trunk/boost/numeric/ublas/matrix_sparse.hpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Modified: trunk/boost/numeric/ublas/matrix_sparse.hpp
==============================================================================
--- trunk/boost/numeric/ublas/matrix_sparse.hpp (original)
+++ trunk/boost/numeric/ublas/matrix_sparse.hpp 2009-06-22 16:58:30 EDT (Mon, 22 Jun 2009)
@@ -2903,7 +2903,7 @@
void erase_element (size_type i, size_type j) {
size_type element1 = layout_type::index_M (i, j);
size_type element2 = layout_type::index_m (i, j);
- if (element1 + 1 > filled1_)
+ if (element1 + 1 >= filled1_)
return;
vector_subiterator_type itv (index1_data_.begin () + element1);
subiterator_type it_begin (index2_data_.begin () + zero_based (*itv));
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk