Mercurial > hg > octave-lyh
changeset 6389:f427b33aeb4c
[project @ 2007-03-07 09:13:50 by jwe]
author | jwe |
---|---|
date | Wed, 07 Mar 2007 09:13:50 +0000 |
parents | 4109a2386346 |
children | 334499d75c5c |
files | liboctave/Array.cc liboctave/ChangeLog |
diffstat | 2 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/Array.cc +++ b/liboctave/Array.cc @@ -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;
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,5 +1,8 @@ 2007-03-07 John W. Eaton <jwe@octave.org> + * Array.cc (assign1 (Array<LT>&, const Array<RT>&, const LT&)): + Only allow resizing empty LHS if it is 0x0. + * Array.cc (Array<T>::maybe_delete_elements (Array<idx_vector>&, const T&)): Handle case of more indices than dimensions. (assign (Array<LT>&, const Array<RT>&, const LT&)): Allow more