Skip to content

Commit

Permalink
Fix variable index in fmi3{Get|Set}Binary() (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-sommer authored Jul 5, 2024
1 parent 878a034 commit 6d3a981
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/fmi3Functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,9 @@ fmi3Status fmi3GetBinary(fmi3Instance instance,

BEGIN_FUNCTION(GetBinary);

size_t index = 0;

for (size_t i = 0; i < nValueReferences; i++) {
size_t index = 0;
CALL(getBinary(S, (ValueReference)valueReferences[i], valueSizes, (const char**)values, nValues, &index));
}

Expand Down Expand Up @@ -694,8 +695,9 @@ fmi3Status fmi3SetBinary(fmi3Instance instance,

BEGIN_FUNCTION(SetBinary);

size_t index = 0;

for (size_t i = 0; i < nValueReferences; i++) {
size_t index = 0;
CALL(setBinary(S, (ValueReference)valueReferences[i], valueSizes, (const char* const*)values, nValues, &index));
}

Expand Down

0 comments on commit 6d3a981

Please sign in to comment.