Ver código fonte

bugfix for EigValue security check

Alexander Freytag 11 anos atrás
pai
commit
379f972793
1 arquivos alterados com 1 adições e 1 exclusões
  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..." );
   }