From 7ee28ff5d2e87f029db042aedea21252f259cdcc Mon Sep 17 00:00:00 2001 From: Thomas Quinot Date: Tue, 26 Jul 2005 12:00:00 +0000 Subject: [PATCH] (Unmarshall_To_Any): The expected aggregate element count for a sequence is Length + 1, because the length is added as the first element of the aggregate. Fix incorrect computation of the expected length accordingly. [Imported from Perforce change 9428 at 2006-12-01 21:44:16] Subversion-branch: /trunk/polyorb Subversion-revision: 36914 --- src/polyorb-representations-cdr.adb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/polyorb-representations-cdr.adb b/src/polyorb-representations-cdr.adb index 0212ee3bf..13a6cde69 100644 --- a/src/polyorb-representations-cdr.adb +++ b/src/polyorb-representations-cdr.adb @@ -1883,7 +1883,7 @@ package body PolyORB.Representations.CDR is end if; if Is_Empty (Data) - or else Get_Aggregate_Count (Data) /= Len + or else Get_Aggregate_Count (Data) /= Len + 1 then Move_Any_Value (Data, Get_Empty_Any_Aggregate (Get_Type (Data))); @@ -1895,7 +1895,8 @@ package body PolyORB.Representations.CDR is pragma Debug (O ("Unmarshall_To_Any: unmarshalling" - & Unsigned_Long'Image (Len) & " elements")); + & Unsigned_Long'Image (Len) & " elements, " + & "Add_Elements = " & Boolean'Image (Add_Elements))); for J in 1 .. Len loop if Add_Elements then