Эх сурвалжийг харах

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 жил өмнө
parent
commit
539e034e9f

+ 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