Mercurial > hg > octave-lyh
changeset 8564:b0f803b5ce41
more indexing fixes
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 22 Jan 2009 13:27:47 +0100 |
parents | 3a3421a9f0bb |
children | 4a864c4e682d |
files | src/ChangeLog src/ov-struct.cc src/pt-idx.cc |
diffstat | 3 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2009-01-22 Jaroslav Hajek <highegg@gmail.com> + + * pt-idx.cc (tree_index_expression::lvalue): Correct tmpi when seeing + a plain struct component. + * ov-struct.cc (octave_struct::subsasgn): Use proper type substr in + empty_conv. + 2009-01-22 Jaroslav Hajek <highegg@gmail.com> * DLD-FUNCTIONS/qr.cc: Remove HAVE_QRUPDATE check.
--- a/src/ov-struct.cc +++ b/src/ov-struct.cc @@ -332,7 +332,7 @@ if (! tmp.is_defined () || tmp.is_zero_by_zero ()) { - tmp = octave_value::empty_conv (type.substr (1), rhs); + tmp = octave_value::empty_conv (next_type, rhs); tmp.make_unique (); // probably a no-op. } else
--- a/src/pt-idx.cc +++ b/src/pt-idx.cc @@ -623,12 +623,10 @@ { // A plain struct component can also yield a list reference. if (tmp.is_defined () && tmpi < i) - { tmp = tmp.subsref (type.substr (tmpi, i - tmpi), tmpidx, true); - tmpi = i; - tmpidx.clear (); - } + tmpi = i; + tmpidx.clear (); if (tmp.is_cs_list ()) gripe_indexed_cs_list ();