# HG changeset patch # User jwe # Date 1173258830 0 # Node ID f427b33aeb4c4e756bfb36183e3183f4bdfc3046 # Parent 4109a238634692b442ad03d8bbd8a869a29246be [project @ 2007-03-07 09:13:50 by jwe] diff -r 4109a2386346 -r f427b33aeb4c liboctave/Array.cc --- a/liboctave/Array.cc Wed Mar 07 08:47:36 2007 +0000 +++ b/liboctave/Array.cc Wed Mar 07 09:13:50 2007 +0000 @@ -2516,6 +2516,16 @@ if (n != 0) { + dim_vector lhs_dims = lhs.dims (); + + if (lhs_len == 0 && ! lhs_dims.all_zero ()) + { + (*current_liboctave_error_handler) + ("A(I) = X: unable to resize A"); + + retval = 0; + } + if (rhs_len == n || rhs_len == 1) { octave_idx_type max_idx = lhs_idx.max () + 1; diff -r 4109a2386346 -r f427b33aeb4c liboctave/ChangeLog --- a/liboctave/ChangeLog Wed Mar 07 08:47:36 2007 +0000 +++ b/liboctave/ChangeLog Wed Mar 07 09:13:50 2007 +0000 @@ -1,5 +1,8 @@ 2007-03-07 John W. Eaton + * Array.cc (assign1 (Array&, const Array&, const LT&)): + Only allow resizing empty LHS if it is 0x0. + * Array.cc (Array::maybe_delete_elements (Array&, const T&)): Handle case of more indices than dimensions. (assign (Array&, const Array&, const LT&)): Allow more