changeset 16661:8291109ac3fd

require that dynamic field names have only one row * pt-idx.cc (tree_index_expression::get_struct_index): Require field name to have one row.
author John W. Eaton <jwe@octave.org>
date Tue, 14 May 2013 05:24:19 -0400
parents cbb1bb7a5c3d
children 72665c4ae25b
files libinterp/parse-tree/pt-idx.cc
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-idx.cc	Tue May 14 05:23:53 2013 -0400
+++ b/libinterp/parse-tree/pt-idx.cc	Tue May 14 05:24:19 2013 -0400
@@ -217,7 +217,7 @@
 
           if (! error_state)
             {
-              if (t.is_string ())
+              if (t.is_string () && t.rows () == 1)
                 fn = t.string_value ();
               else
                 error ("dynamic structure field names must be character strings");