diff src/oct-stream.cc @ 2613:5bcee07be597

[project @ 1997-01-21 03:52:08 by jwe]
author jwe
date Tue, 21 Jan 1997 03:53:18 +0000
parents 8125b6f9c134
children 00b2eff19bf5
line wrap: on
line diff
--- a/src/oct-stream.cc
+++ b/src/oct-stream.cc
@@ -1584,7 +1584,14 @@
     {
       octave_value tmp_val = values (idx);
 
-      retval = tmp_val.is_string () && tmp_val.rows () == 1;
+      // An empty string has zero rows and zero columns.
+
+      if (tmp_val.is_string ())
+	{
+	  int nr = tmp_val.rows ();
+
+	  retval = (nr == 1 || (nr == 0 && tmp_val.columns () == 0));
+	}
     }
 
   return retval;