changeset 7460:cb8d75cedc93

fix struct resizing bug
author John W. Eaton <jwe@octave.org>
date Fri, 08 Feb 2008 03:28:11 -0500
parents d3fe4d466bc2
children da8e4aa06134
files src/ChangeLog src/ov-struct.cc
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,7 @@
 2008-02-08  John W. Eaton  <jwe@octave.org>
 
+	* ov-struct.cc (octave_struct::subsref): Allow Cell::index to resize.
+
 	* input.cc (interactive_input): Eliminate debug arg.  Change All uses.
 	(get_user_input): Don't process input_buf if there is an error.
 	Call reset_error_handler instead of setting error_state to 0.
--- a/src/ov-struct.cc
+++ b/src/ov-struct.cc
@@ -118,7 +118,7 @@
 
 	    if (! error_state)
 	      {
-		Cell t = tmp.index (idx.front ());
+		Cell t = tmp.index (idx.front (), true);
 
 		retval(0) = (t.length () == 1) ? t(0) : octave_value (t, true);
 
@@ -129,7 +129,7 @@
 	      }
 	  }
 	else
-	  retval(0) = map.index (idx.front ());
+	  retval(0) = map.index (idx.front (), true);
       }
       break;