Skip to content

Commit e4fa6b3

Browse files
committed
Fix overflow detection
1 parent 33350fe commit e4fa6b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

highs/ipm/hipo/ipm/FactorHiGHSSolver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static Int getASstructure(const HighsSparseMatrix& A, std::vector<Int>& ptr,
3434
Int mA = A.num_row_;
3535
Int nzA = A.numNz();
3636

37-
if (nA + nzA + mA > kHighsIInf) return kStatusOverflow;
37+
if ((int64_t)nA + nzA + mA > (int64_t)kHighsIInf) return kStatusOverflow;
3838

3939
ptr.resize(nA + mA + 1);
4040
rows.resize(nA + nzA + mA);

0 commit comments

Comments
 (0)