Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 0fa8007

Browse files
perostOpenModelica-Hudson
authored andcommitted
Fix anyString for SOME().
Belonging to [master]: - #2796
1 parent f5cbc6b commit 0fa8007

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

SimulationRuntime/c/meta/meta_modelica.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -337,14 +337,14 @@ inline static mmc_sint_t anyStringWork(void* any, mmc_sint_t ix, modelica_metaty
337337
}
338338

339339
if (numslots > 0 && ctor == 0) { /* TUPLE */
340-
/* Pointers.mo, pointer are saved as tuples, check if we have it in the stack so we break the cycle */
341-
data = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(any),1));
342-
if (listMember(data, stack))
343-
{
340+
/* Pointers.mo, pointer are saved as tuples, check if we have it in the stack so we break the cycle */
341+
data = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(any),1));
342+
if (listMember(data, stack))
343+
{
344344
checkAnyStringBufSize(ix,12);
345345
ix += sprintf(anyStringBuf+ix, "(Pointer())");
346346
return ix;
347-
}
347+
}
348348
checkAnyStringBufSize(ix,2);
349349
ix += sprintf(anyStringBuf+ix, "(");
350350
for (i = 0; i < numslots; i++) {
@@ -369,7 +369,7 @@ inline static mmc_sint_t anyStringWork(void* any, mmc_sint_t ix, modelica_metaty
369369
if (numslots==1 && ctor==1) /* SOME(x) */ {
370370
checkAnyStringBufSize(ix,6);
371371
ix += sprintf(anyStringBuf+ix, "SOME(");
372-
ix = anyStringWork(data, ix, stack);
372+
ix = anyStringWork(MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(any), 1)), ix, stack);
373373
checkAnyStringBufSize(ix,2);
374374
ix += sprintf(anyStringBuf+ix, ")");
375375
return ix;

0 commit comments

Comments
 (0)