Skip to content

Commit

Permalink
- Fix boxptr_intMax for negative arguments
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@9482 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Jul 15, 2011
1 parent 0356ec0 commit 948d8cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion c_runtime/meta/meta_modelica_builtin.cpp
Expand Up @@ -65,7 +65,8 @@ intString_rettype intString(modelica_integer i)

modelica_metatype boxptr_intMax(modelica_metatype a,modelica_metatype b)
{
return a > b ? a : b;
/* We need to unbox because pointers may be unsigned */
return mmc_unbox_integer(a) > mmc_unbox_integer(b) ? a : b;
}

/* String Character Conversion */
Expand Down

0 comments on commit 948d8cc

Please sign in to comment.