diff liboctave/CMatrix.cc @ 7532:493bb0de3199

avoid another xGELSD workspace query bug
author John W. Eaton <jwe@octave.org>
date Tue, 26 Feb 2008 02:47:56 -0500
parents 8c32f95c2639
children f9983d2761df
line wrap: on
line diff
--- a/liboctave/CMatrix.cc	Tue Feb 26 02:16:32 2008 -0500
+++ b/liboctave/CMatrix.cc	Tue Feb 26 02:47:56 2008 -0500
@@ -2486,6 +2486,13 @@
 	  if (std::real (work(0)) < lworkaround)
 	    work(0) = lworkaround;
 	}
+      else if (m >= n)
+	{
+	  octave_idx_type lworkaround = 2*m + m*nrhs;
+
+	  if (std::real (work(0)) < lworkaround)
+	    work(0) = lworkaround;
+	}
 
       lwork = static_cast<octave_idx_type> (std::real (work(0)));
       work.resize (lwork);