diff src/ov-mapper.cc @ 5156:7c3b22bafedc

[project @ 2005-02-22 17:42:15 by jwe]
author jwe
date Tue, 22 Feb 2005 17:42:16 +0000
parents 2d03212b76b4
children 23b37da9fd5b
line wrap: on
line diff
--- a/src/ov-mapper.cc
+++ b/src/ov-mapper.cc
@@ -246,7 +246,11 @@
   switch (type[0])
     {
     case '(':
-      retval = do_multi_index_op (nargout, idx.front ());
+      {
+	int tmp_nargout = (type.length () > 1 && nargout == 0) ? 1 : nargout;
+
+	retval = do_multi_index_op (tmp_nargout, idx.front ());
+      }
       break;
 
     case '{':
@@ -261,14 +265,14 @@
       panic_impossible ();
     }
 
-  return retval;
-
   // XXX FIXME XXX -- perhaps there should be an
   // octave_value_list::next_subsref member function?  See also
   // and octave_builtin::subsref.
 
   if (idx.size () > 1)
     retval = retval(0).next_subsref (nargout, type, idx);
+
+  return retval;
 }
 
 octave_value_list