Skip to content

Commit 31e2427

Browse files
committed
Now testing just the first three chatacters of upper_word for "MAX"/"MIN" in MPS read
1 parent a490f61 commit 31e2427

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/io/HMpsFF.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,9 @@ HMpsFF::Parsekey HMpsFF::checkFirstWord(std::string& strline, size_t& start,
424424
key = HMpsFF::Parsekey::kName;
425425
else if (upper_word == "OBJSENSE")
426426
key = HMpsFF::Parsekey::kObjsense;
427-
else if (upper_word == "MAX")
427+
else if (upper_word.substr(0, 3) == "MAX")
428428
key = HMpsFF::Parsekey::kMax;
429-
else if (upper_word == "MIN")
429+
else if (upper_word.substr(0, 3) == "MIN")
430430
key = HMpsFF::Parsekey::kMin;
431431
else if (upper_word == "ROWS")
432432
key = HMpsFF::Parsekey::kRows;

0 commit comments

Comments
 (0)