Mercurial > octave-nkf
comparison liboctave/Array.cc @ 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 | 7cbe01c21986 |
children | 9238637cb81c |
comparison
equal
deleted
inserted
replaced
8301:f7d44b6a74df | 8302:f2e050b62199 |
---|---|
1350 | 1350 |
1351 template <class T> | 1351 template <class T> |
1352 void | 1352 void |
1353 Array<T>::delete_elements (int dim, const idx_vector& i) | 1353 Array<T>::delete_elements (int dim, const idx_vector& i) |
1354 { | 1354 { |
1355 if (dim > ndims ()) | 1355 if (dim < 0 || dim >= ndims ()) |
1356 { | 1356 { |
1357 (*current_liboctave_error_handler) | 1357 (*current_liboctave_error_handler) |
1358 ("invalid dimension in delete_elements"); | 1358 ("invalid dimension in delete_elements"); |
1359 return; | 1359 return; |
1360 } | 1360 } |