Skip to content

Commit

Permalink
Fix unions serialized size (#306)
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo González Moreno <[email protected]>
  • Loading branch information
richiware authored Feb 26, 2024
1 parent ae453fb commit 37fc90c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ public long maxSerializedSize(

for (Member member : getMembers())
{
reset_alignment = current_alignment;
reset_alignment = MemberedTypeCode.xcdr_extra_member_serialized_size(
current_alignment,
union_ext_kind, member.isAnnotationOptional(),
member);
reset_alignment += ((TypeCode)member.getTypecode()).maxSerializedSize(reset_alignment);
if (union_max_size_serialized < reset_alignment)
{
Expand Down

0 comments on commit 37fc90c

Please sign in to comment.