Commit a3e75478 authored by Houtan Bastani's avatar Houtan Bastani

fix bug when defining variable with value on the command line with -D option...

fix bug when defining variable with value on the command line with -D option (problem introduced in ee5fc6b1)
parent e7c9c26d
Pipeline #586 passed with stage
in 1 minute and 42 seconds
/*
* Copyright (C) 2003-2018 Dynare Team
* Copyright (C) 2003-2019 Dynare Team
*
* This file is part of Dynare.
*
......@@ -269,7 +269,7 @@ main(int argc, char **argv)
auto equal_index = s.find('=');
if (equal_index != string::npos)
defines[s.substr(2, equal_index)] = s.substr(equal_index+1);
defines[s.substr(2, equal_index-2)] = s.substr(equal_index+1);
else
defines[s.substr(2)] = "1";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment