Explorar o código

bugfix for EigValue security check

Alexander Freytag %!s(int64=11) %!d(string=hai) anos
pai
achega
379f972793
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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..." );
   }