diff src/ov-scalar.cc @ 2423:de430cdd9234

[project @ 1996-10-18 20:39:41 by jwe]
author jwe
date Fri, 18 Oct 1996 20:39:42 +0000
parents 2142216bf85a
children 1573640a9994
line wrap: on
line diff
--- a/src/ov-scalar.cc	Fri Oct 18 20:22:17 1996 +0000
+++ b/src/ov-scalar.cc	Fri Oct 18 20:39:42 1996 +0000
@@ -32,6 +32,7 @@
 #include "gripes.h"
 #include "oct-obj.h"
 #include "ov-scalar.h"
+#include "ov-re-mat.h"
 #include "ov-typeinfo.h"
 #include "pr-output.h"
 #include "xdiv.h"
@@ -68,7 +69,11 @@
       //
       // and similar constructions.  Hmm...
 
-      octave_value tmp (matrix_value ());
+      // XXX FIXME XXX -- using this constructor avoids narrowing the
+      // 1x1 matrix back to a scalar value.  Need a better solution
+      // to this problem.
+
+      octave_value tmp (new octave_matrix (matrix_value ()));
 
       retval = tmp.index (idx);
     }