Skip to content

Commit

Permalink
- Also look for index>0 when evaluating subscripts
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@8315 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Mar 19, 2011
1 parent f9bc7e4 commit 434028d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Compiler/FrontEnd/Ceval.mo
Expand Up @@ -5344,7 +5344,7 @@ algorithm
equation
(cache,v1 as Values.INTEGER(indx),_) = ceval(cache,env, e1, impl,NONE(), SOME(dim), msg);
e1_1 = ValuesUtil.valueExp(v1);
true = indx <= dim;
true = (indx <= dim) and (indx > 0);
then
(cache,DAE.INDEX(e1_1));

Expand All @@ -5353,7 +5353,7 @@ algorithm
equation
(cache,v1 as Values.ENUM_LITERAL(index = indx),_) = ceval(cache,env, e1, impl,NONE(), SOME(dim), msg);
e1_1 = ValuesUtil.valueExp(v1);
true = indx <= dim;
true = (indx <= dim) and (indx > 0);
then
(cache,DAE.INDEX(e1_1));

Expand Down

0 comments on commit 434028d

Please sign in to comment.