summaryrefslogtreecommitdiff
path: root/TAO/tao/AnyTypeCode/Union_TypeCode.cpp
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2005-10-18 07:10:00 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2005-10-18 07:10:00 +0000
commite5038b565d810c160831d2755893427cb6d1c6b4 (patch)
tree2ce52b0a6901d8a7c561c664995c02ff50723be3 /TAO/tao/AnyTypeCode/Union_TypeCode.cpp
parent3028c2dfc0af7ef64b344ed65d5b2889a450d965 (diff)
downloadATCD-e5038b565d810c160831d2755893427cb6d1c6b4.tar.gz
ChangeLogTag:Tue Oct 18 00:08:30 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
Diffstat (limited to 'TAO/tao/AnyTypeCode/Union_TypeCode.cpp')
-rw-r--r--TAO/tao/AnyTypeCode/Union_TypeCode.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/TAO/tao/AnyTypeCode/Union_TypeCode.cpp b/TAO/tao/AnyTypeCode/Union_TypeCode.cpp
index ad3a104db41..c88e8ec1236 100644
--- a/TAO/tao/AnyTypeCode/Union_TypeCode.cpp
+++ b/TAO/tao/AnyTypeCode/Union_TypeCode.cpp
@@ -36,6 +36,14 @@ TAO::TypeCode::Union<StringType,
// Create a CDR encapsulation.
TAO_OutputCDR enc;
+ // Account for the encoded CDR encapsulation length and byte order.
+ //
+ // Aligning on an octet since the next value after the CDR
+ // encapsulation length will always be the byte order octet/boolean
+ // in this case.
+ offset = ACE_align_binary (offset + 4,
+ ACE_CDR::OCTET_ALIGN);
+
bool const success =
(enc << TAO_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER))
&& (enc << TAO_OutputCDR::from_string (this->base_attributes_.id (), 0))