Browse Source

bugfix for EigValue security check

Alexander Freytag 11 năm trước cách đây
mục cha
commit
379f972793
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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..." );
   }