diff liboctave/CMatrix.cc @ 8999:dc07bc4157b8

allow empty matrices in stream input operators
author Jaroslav Hajek <highegg@gmail.com>
date Fri, 20 Mar 2009 11:39:25 +0100
parents d91fa4b20bbb
children 8145f2255276
line wrap: on
line diff
--- a/liboctave/CMatrix.cc	Thu Mar 19 17:46:38 2009 +0100
+++ b/liboctave/CMatrix.cc	Fri Mar 20 11:39:25 2009 +0100
@@ -3640,9 +3640,7 @@
   octave_idx_type nr = a.rows ();
   octave_idx_type nc = a.cols ();
 
-  if (nr < 1 || nc < 1)
-    is.clear (std::ios::badbit);
-  else
+  if (nr > 0 && nc > 0)
     {
       Complex tmp;
       for (octave_idx_type i = 0; i < nr; i++)