diff src/pt-const.cc @ 2275:38fea6d34daf

[project @ 1996-05-24 04:06:52 by jwe]
author jwe
date Fri, 24 May 1996 04:08:52 +0000
parents 517a43164a60
children 5a3f1d00a474
line wrap: on
line diff
--- a/src/pt-const.cc
+++ b/src/pt-const.cc
@@ -2949,7 +2949,16 @@
 	      break;
 
 	    case char_matrix_constant_str:
-	      retval = octave_value (charMatrix (char_matrix->value ()), 1);
+	      {
+		// Kluge to prevent s([]) from turning into a string
+		// with no rows...
+		charMatrix tmp (char_matrix->value ());
+
+		if (tmp.rows () == 0 && tmp.columns () == 0)
+		  tmp.resize (1, 0);
+
+		retval = octave_value (tmp, 1);
+	      }
 	      break;
 
 	    default: