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 21d39d0a..58684a5a 100644 --- a/src/main/java/com/eprosima/fastdds/idl/templates/DDSPubSubTypeSource.stg +++ b/src/main/java/com/eprosima/fastdds/idl/templates/DDSPubSubTypeSource.stg @@ -142,6 +142,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*/) {