diff --git a/src/main/java/com/eprosima/fastdds/idl/templates/DDSPubSubTypeSource.stg b/src/main/java/com/eprosima/fastdds/idl/templates/DDSPubSubTypeSource.stg index 6475e9ef..c1cf9dcd 100644 --- a/src/main/java/com/eprosima/fastdds/idl/templates/DDSPubSubTypeSource.stg +++ b/src/main/java/com/eprosima/fastdds/idl/templates/DDSPubSubTypeSource.stg @@ -96,6 +96,7 @@ bool $struct.name$PubSubType::serialize( ser.serialize_encapsulation(); // Serialize the object. ser << *p_type; + ser.set_dds_cdr_options({0,0}); } catch (eprosima::fastcdr::exception::Exception& /*exception*/) {