Mercurial > octave
changeset 8302:f2e050b62199
fix dim check in Array<T>::delete_elements
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Sun, 02 Nov 2008 06:44:12 +0100 |
parents | f7d44b6a74df |
children | b11c31849b44 |
files | liboctave/Array.cc liboctave/ChangeLog |
diffstat | 2 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/Array.cc Sun Nov 02 06:15:11 2008 +0100 +++ b/liboctave/Array.cc Sun Nov 02 06:44:12 2008 +0100 @@ -1352,7 +1352,7 @@ void Array<T>::delete_elements (int dim, const idx_vector& i) { - if (dim > ndims ()) + if (dim < 0 || dim >= ndims ()) { (*current_liboctave_error_handler) ("invalid dimension in delete_elements");
--- a/liboctave/ChangeLog Sun Nov 02 06:15:11 2008 +0100 +++ b/liboctave/ChangeLog Sun Nov 02 06:44:12 2008 +0100 @@ -2,6 +2,8 @@ * idx-vector.cc (idx_vector::is_complement): Set resulting extent correctly. + * Array.cc (Array<T>::delete_elements (int, const idx_vector&)): + Fix check for invalid dim. 2008-10-31 Jaroslav Hajek <highegg@gmail.com>