Skip to content

Commit

Permalink
Fix the logic of min/max of integer arrays
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@21378 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Jul 1, 2014
1 parent fc96b9a commit 406ecfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SimulationRuntime/c/util/integer_array.c
Expand Up @@ -1427,7 +1427,7 @@ void linspace_integer_array(modelica_integer x1, modelica_integer x2, int n,
modelica_integer max_integer_array(const integer_array_t a)
{
size_t nr_of_elements;
modelica_integer max_element = 0;
modelica_integer max_element = LONG_MIN;

assert(base_array_ok(&a));

Expand All @@ -1449,7 +1449,7 @@ modelica_integer max_integer_array(const integer_array_t a)
modelica_integer min_integer_array(const integer_array_t a)
{
size_t nr_of_elements;
modelica_integer min_element = -LONG_MAX;
modelica_integer min_element = LONG_MAX;

assert(base_array_ok(&a));

Expand Down

0 comments on commit 406ecfb

Please sign in to comment.