Skip to content

Commit

Permalink
- ansi C.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@19662 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Mar 20, 2014
1 parent 1b9cc0a commit ee1a077
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions SimulationRuntime/c/meta/meta_modelica.c
Expand Up @@ -793,10 +793,11 @@ void changeStdStreamBuffer(void) {
char* getRecordElement(modelica_metatype arr, modelica_integer i) {
/* get the element from the record array */
void* name = (void*)mmc_gdb_arrayGet(0, arr, i);
char nameStr[40];
char nameStr[40], *displayName = NULL, *type = NULL, *formatString = NULL;

/* print the pointer as long to a buffer to get the string length */
sprintf(nameStr, "%ld", (long)name);

char *displayName = NULL, *type = NULL, *formatString = NULL;
/* get the name of the element */
getRecordElementName(arr, i - 2);
displayName = malloc(strlen(anyStringBuf) + 1);
Expand Down

0 comments on commit ee1a077

Please sign in to comment.