diff src/ov.cc @ 10871:333bf09e3b6e

only allow struct assignments to non-struct values for empty arrays
author Jaroslav Hajek <highegg@gmail.com>
date Mon, 09 Aug 2010 09:04:00 +0200
parents 1b2fcd122c6a
children fd0a3ac60b0e
line wrap: on
line diff
--- a/src/ov.cc	Sun Aug 08 21:23:39 2010 -0700
+++ b/src/ov.cc	Mon Aug 09 09:04:00 2010 +0200
@@ -1332,17 +1332,13 @@
 
   if (! error_state)
     {
-      if (type[0] == '.' && ! (is_map () || is_object ()))
-        {
-          octave_value tmp = Octave_map ();
-          *this = tmp.subsasgn (type, idx, t_rhs);
-        }
-      else
-        *this = subsasgn (type, idx, t_rhs);
+      octave_value tmp = subsasgn (type, idx, t_rhs);
 
       if (error_state)
         gripe_assign_failed_or_no_method (assign_op_as_string (op_asn_eq),
                                           type_name (), rhs.type_name ());
+      else
+        *this = tmp;
     }
 
   return *this;