From fe7d2eb2705a4932533c4c8e2fd59ca64d89f1d0 Mon Sep 17 00:00:00 2001 From: rolfvdhulst Date: Mon, 29 Jul 2024 13:53:05 +0200 Subject: [PATCH] Fix error reading fixed format .mps files --- src/io/HMpsFF.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/io/HMpsFF.cpp b/src/io/HMpsFF.cpp index 14f0bf5dc0..3bd28e48f3 100644 --- a/src/io/HMpsFF.cpp +++ b/src/io/HMpsFF.cpp @@ -592,12 +592,8 @@ HMpsFF::Parsekey HMpsFF::parseRows(const HighsLogOptions& log_options, // Detect if file is in fixed format. if (!is_end(strline, rowname_end)) { - std::string name = strline.substr(start + 1); - name = trim(name); - if (name.size() > 8) - return HMpsFF::Parsekey::kFail; - else - return HMpsFF::Parsekey::kFixedFormat; + //Either the name contains spaces, or extra fields are populated. + return HMpsFF::Parsekey::kFixedFormat; } // Do not add to matrix if row is free.