Преглед на файлове

fixed an assert in min_quad_with_fixed: size() could be negative if the matrix is too large (int overflow)

Former-commit-id: 63651ec958f793bd1a7385b8e0983598ac0d8e87
Daniele Panozzo преди 9 години
родител
ревизия
539e034e9f
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      include/igl/min_quad_with_fixed.cpp

+ 1 - 1
include/igl/min_quad_with_fixed.cpp

@@ -94,7 +94,7 @@ IGL_INLINE bool igl::min_quad_with_fixed_precompute(
 
   SparseMatrix<T> Auu;
   slice(A,data.unknown,data.unknown,Auu);
-  assert(Auu.size() > 0 && "There should be at least one unknown.");
+  assert(Auu.size() != 0 && Auu.rows() > 0 && "There should be at least one unknown.");
 
   // Positive definiteness is *not* determined, rather it is given as a
   // parameter