diff src/ov-cell.cc @ 7813:12a68443191c

[mq]: cellstr
author Jaroslav Hajek <highegg@gmail.com>
date Thu, 22 May 2008 22:00:26 +0200
parents f5268d7045d7
children 283989f2da9b
line wrap: on
line diff
--- a/src/ov-cell.cc	Wed May 21 12:26:57 2008 +0200
+++ b/src/ov-cell.cc	Thu May 22 22:00:26 2008 +0200
@@ -1080,7 +1080,9 @@
 	  string_vector s = args(0).all_strings ();
 
 	  if (! error_state)
-	    retval = Cell (s, true);
+	    retval = (s.is_empty ()
+                      ? Cell (octave_value (std::string ()))
+                      : Cell (s, true));
 	  else
 	    error ("cellstr: expecting argument to be a 2-d character array");
 	}