diff src/ov-struct.cc @ 7040:1f16da18d85d

[project @ 2007-10-19 18:24:19 by jwe]
author jwe
date Fri, 19 Oct 2007 18:24:19 +0000
parents 120f3135952f
children fbf8576cf399
line wrap: on
line diff
--- a/src/ov-struct.cc	Fri Oct 19 16:12:05 2007 +0000
+++ b/src/ov-struct.cc	Fri Oct 19 18:24:19 2007 +0000
@@ -367,9 +367,12 @@
 	      {
 		Cell tmp_cell = Cell (t_rhs.list_value ());
 
-		// FIXME -- shouldn't care if the dimensions of the
-		// RHS don't match the dimensions of the subscriped
-		// LHS.
+		// The shape of the RHS is irrelevant, we just want
+		// the number of elements to agree and to preserve the
+		// shape of the left hand side of the assignment.
+
+		if (numel () == tmp_cell.numel ())
+		  tmp_cell = tmp_cell.reshape (dims ());
 
 		map.assign (key, tmp_cell);
 	      }