Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@mahge Fix ticket #6099 5aea2aa - Cast literal to appropriate OMC type. index_t (a.k.a. modelica_integer) is long long. Literals in C take the first type that they can fit in. For small literals this is 'int'. It would have been all fine, if we were not sending these literals as parameters to functions that have variadic arguments. va_list of arguments are 'parsed' by the functions assuming the inputs are of type modelica_integer (or index_t, or similar). So depending on what compiler and arch we are on, this seems to cause issues because the arguments are parsed with the wrong size. @mahge Use 'modelica_integer' instead of plain 'int'. acc1332 - This is important if the variable is, at some point, passed to some of our runtime function that have variadic arguments. They split arguments expecting a modelica_integer (a.k.a long long) type.
- Loading branch information
Showing
1 changed file
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters