aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2017-03-15 15:18:03 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2017-03-15 15:18:03 +0100
commit89fd0c38812b024734eeacf9c23ed3714c8b0f93 (patch)
tree6f7f2aa75cd98a44f532e553829a7fd392987b46 /Eigen
parent61160a21d23880749bce3b0d630d9880f70af6e5 (diff)
better check array index before using it
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/OrderingMethods/Eigen_Colamd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Eigen/src/OrderingMethods/Eigen_Colamd.h b/Eigen/src/OrderingMethods/Eigen_Colamd.h
index 933cd564b..da85b4d6e 100644
--- a/Eigen/src/OrderingMethods/Eigen_Colamd.h
+++ b/Eigen/src/OrderingMethods/Eigen_Colamd.h
@@ -1004,7 +1004,7 @@ static IndexType find_ordering /* return the number of garbage collections */
COLAMD_ASSERT (head [min_score] >= COLAMD_EMPTY) ;
/* get pivot column from head of minimum degree list */
- while (head [min_score] == COLAMD_EMPTY && min_score < n_col)
+ while (min_score < n_col && head [min_score] == COLAMD_EMPTY)
{
min_score++ ;
}