Skip to content

Commit

Permalink
Fix printing of negative real numbers that look like integers
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@18917 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Feb 1, 2014
1 parent 9c81a0e commit e7824ef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions SimulationRuntime/c/meta/realString.c
Expand Up @@ -211,6 +211,7 @@ modelica_string _old_realString(modelica_real r)
int ix = snprintf(buffer, 32, "%.16g", r);
/* If it looks like an integer, we need to append .0 so it looks like real */
endptr = buffer;
if (*endptr == '-') endptr++;
while (isdigit(*endptr)) endptr++;
if (0 == *endptr) {
*endptr++ = '.';
Expand Down

0 comments on commit e7824ef

Please sign in to comment.