diff liboctave/Array.cc @ 4703:72c28fd651c4

[project @ 2004-01-22 00:01:09 by jwe]
author jwe
date Thu, 22 Jan 2004 00:01:09 +0000
parents 4d2e1623c9a9
children 8d4bb887f381
line wrap: on
line diff
--- a/liboctave/Array.cc
+++ b/liboctave/Array.cc
@@ -2737,7 +2737,7 @@
 
       for (int j = 0; j < idx_is_colon.length (); j++)
 	{
-	  if (rhs_dims(jj) == 1)
+	  if (jj < rhs_dims.length () && rhs_dims(jj) == 1)
 	    jj++;
 	  else if (idx_is_colon(j))
 	    {
@@ -2869,6 +2869,8 @@
       retval = 0;
     }
 
+  lhs.chop_trailing_singletons ();
+  
   lhs.clear_index ();
 
   return retval;