# HG changeset patch # User Jaroslav Hajek # Date 1232627267 -3600 # Node ID b0f803b5ce41e87b1cf9ab07b58bd29ba63516da # Parent 3a3421a9f0bbf34c39318e0f56afc19fcd882cfc more indexing fixes diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2009-01-22 Jaroslav Hajek + + * 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 * DLD-FUNCTIONS/qr.cc: Remove HAVE_QRUPDATE check. diff --git a/src/ov-struct.cc b/src/ov-struct.cc --- 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 diff --git a/src/pt-idx.cc b/src/pt-idx.cc --- 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 ();