Changeset d093f807 in OpenModelica


Ignore:
Timestamp:
2021-04-06T12:55:20+02:00 (3 years ago)
Author:
Per Östlund <perost86@…>
Parents:
8d422626
git-author:
Per Östlund <perost86@…> (04/06/21 12:53:05)
git-committer:
Per Östlund <perost86@…> (04/06/21 12:55:20)
Message:

Fix handling of convertElement

  • Check that the path is actually long enough before trying to fetch the sought after identifier from it.
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • OMCompiler/Compiler/Script/Conversion.mo

    r19d46435 rd093f807  
    19721972
    19731973          case ConversionRule.ELEMENT()
    1974             guard AbsynUtil.pathNthIdent(path, arrayLength(rule.oldPath) + 1) == rule.oldName
     1974            guard path_len > arrayLength(rule.oldPath) and
     1975                  AbsynUtil.pathNthIdent(path, arrayLength(rule.oldPath) + 1) == rule.oldName
    19751976            algorithm
    19761977              if path_len == arrayLength(rule.oldPath) - 1 then
  • testsuite/openmodelica/conversion/Makefile

    r19d46435 rd093f807  
    99ConvertClassVectorize2.mos \
    1010ConvertClassVectorize3.mos \
     11ConvertElement1.mos \
    1112ConvertModifiers1.mos \
    1213ConvertModifiers2.mos \
Note: See TracChangeset for help on using the changeset viewer.