Skip to content

Commit

Permalink
- Handle the special case of + being used without argument as flag to…
Browse files Browse the repository at this point in the history
… OMC.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@17872 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Oct 24, 2013
1 parent cba5847 commit 1a0d508
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Compiler/Util/Flags.mo
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ protected function readArg
algorithm
outNotConsumed := matchcontinue(inArg, inFlags)
local
Integer len;
Integer len, pos;
String flag;

// Ignore flags that don't start with + or -.
Expand Down Expand Up @@ -1158,7 +1158,9 @@ algorithm
else
equation
true = stringEq(stringGetStringChar(inArg, 1), "+");
flag = System.substring(inArg, 2, stringLength(inArg));
len = stringLength(inArg);
pos = Util.if_(len == 1, 1, 2); // Handle + without anything else.
flag = System.substring(inArg, pos, len);
parseFlag(flag, inFlags);
then
false;
Expand Down

0 comments on commit 1a0d508

Please sign in to comment.