From f7fe336be7d138d2209d0ffd2b521d0f3831e455 Mon Sep 17 00:00:00 2001 From: Jens Diewald Date: Tue, 11 Jun 2024 21:24:16 +0200 Subject: [PATCH] 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. --- src/io/HMPSIO.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io/HMPSIO.cpp b/src/io/HMPSIO.cpp index 69e906b66e..b6037d3624 100644 --- a/src/io/HMPSIO.cpp +++ b/src/io/HMPSIO.cpp @@ -564,7 +564,7 @@ HighsStatus writeModelAsMps(const HighsOptions& options, HighsStatus row_name_status = normaliseNames(options.log_options, "row", lp.num_row_, local_row_names, max_row_name_length); - if (row_name_status == HighsStatus::kError) return col_name_status; + if (row_name_status == HighsStatus::kError) return row_name_status; warning_found = row_name_status == HighsStatus::kWarning || warning_found; HighsInt max_name_length = std::max(max_col_name_length, max_row_name_length);