Skip to content

Commit

Permalink
Fix ticket #6171 (#7187)
Browse files Browse the repository at this point in the history
Auxiliary calculations sometimes create empty else branches.
The generated _info.json file had problems with that.
  • Loading branch information
phannebohm committed Feb 19, 2021
1 parent 10ccf67 commit 12c32c0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions OMCompiler/Compiler/SimCode/SerializeModelInfo.mo
Expand Up @@ -1325,8 +1325,10 @@ algorithm
(exp,eqs) := branch;
File.write(file,"[");
serializeExp(file,exp);
File.write(file,",");
serializeList(file,eqs,serializeEquationIndex);
if not listEmpty(eqs) then
File.write(file,",");
serializeList(file,eqs,serializeEquationIndex);
end if;
File.write(file,"]");
end serializeIfBranch;

Expand Down

0 comments on commit 12c32c0

Please sign in to comment.