# HG changeset patch # User Jaroslav Hajek # Date 1242981973 -7200 # Node ID f29db0a0aa85f4db02c4b93b242c2e3a8c4fa039 # Parent 0ae2b6617005b071895a0ad9763cf6f9c449368b fix another indexing bug in liboctinterp diff -r 0ae2b6617005 -r f29db0a0aa85 src/ChangeLog --- a/src/ChangeLog Thu May 21 21:37:11 2009 +0100 +++ b/src/ChangeLog Fri May 22 10:46:13 2009 +0200 @@ -1,3 +1,9 @@ +2009-05-22 Jaroslav Hajek + + * src/ov-base-mat.cc (octave_base_matrix::assign (const + octave_value_list, typename MT::element_type)): Avoid out of bounds + assignments. + 2009-05-21 Michael Goffioul * graphics.cc (figure::properties::get_boundingbox, diff -r 0ae2b6617005 -r f29db0a0aa85 src/ov-base-mat.cc --- a/src/ov-base-mat.cc Thu May 21 21:37:11 2009 +0100 +++ b/src/ov-base-mat.cc Fri May 22 10:46:13 2009 +0200 @@ -334,7 +334,7 @@ { Array idx_vec (n_idx); bool scalar_opt = n_idx == nd; - const dim_vector dv = matrix.dims (); + const dim_vector dv = matrix.dims ().redim (n_idx); for (octave_idx_type i = 0; i < n_idx; i++) { @@ -344,7 +344,7 @@ break; scalar_opt = (scalar_opt && idx_vec(i).is_scalar () - && idx_vec(i)(0) < dv(0)); + && idx_vec(i)(0) < dv(i)); } if (! error_state)