Skip to content
Snippets Groups Projects
Verified Commit cf236d37 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Correctly handle whitespaces when parsing contents of legacy “mcp” tags

parent 42c12629
No related branches found
No related tags found
No related merge requests found
Pipeline #10663 passed
......@@ -2653,6 +2653,12 @@ ParsingDriver::add_model_equal(expr_t arg1, expr_t arg2, map<string, string> eq_
error("'mcp' tag does not contain an inequality");
}()};
// Trim whitespace
var_name.erase(var_name.find_last_not_of(" \n\t") + 1);
var_name.erase(0, var_name.find_first_not_of(" \n\t"));
constant.erase(constant.find_last_not_of(" \n\t") + 1);
constant.erase(0, constant.find_first_not_of(" \n\t"));
int symb_id {[&] {
try
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment