Jelajahi Sumber

bugfix for EigValue security check

Alexander Freytag 11 tahun lalu
induk
melakukan
379f972793
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      core/algebra/EigValues.cpp

+ 1 - 1
core/algebra/EigValues.cpp

@@ -33,7 +33,7 @@ EVArnoldi::getEigenvalues ( const GenericMatrix & data, Vector & eigenvalues,
   }
   
   // did we specify more eigenvalues than the matrix can actually have?
-  if ( k <= data.rows() )
+  if ( k > data.rows() )
   {
     throw ( "EVArnoldi: specified k is larger then dimension of matrix! Aborting..." );
   }