diff liboctave/CSparse.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 542015fada9e
children 5d46c4a894e8
line wrap: on
line diff
--- a/liboctave/CSparse.cc	Thu Mar 19 17:46:38 2009 +0100
+++ b/liboctave/CSparse.cc	Fri Mar 20 11:39:25 2009 +0100
@@ -7470,9 +7470,7 @@
   octave_idx_type nc = a.cols ();
   octave_idx_type nz = a.nzmax ();
 
-  if (nr < 1 || nc < 1)
-    is.clear (std::ios::badbit);
-  else
+  if (nr > 0 && nc > 0)
     {
       octave_idx_type itmp, jtmp, jold = 0;
       Complex tmp;