Skip to content

Commit f7fe336

Browse files
committed
Correctly Report Invalid Row Names
Otherwise, HiGHS may silently not write an MPS file when it runs into invalid row names and still return kOK.
1 parent 43329e5 commit f7fe336

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/io/HMPSIO.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ HighsStatus writeModelAsMps(const HighsOptions& options,
564564
HighsStatus row_name_status =
565565
normaliseNames(options.log_options, "row", lp.num_row_, local_row_names,
566566
max_row_name_length);
567-
if (row_name_status == HighsStatus::kError) return col_name_status;
567+
if (row_name_status == HighsStatus::kError) return row_name_status;
568568
warning_found = row_name_status == HighsStatus::kWarning || warning_found;
569569

570570
HighsInt max_name_length = std::max(max_col_name_length, max_row_name_length);

0 commit comments

Comments
 (0)