(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
This commit is contained in:
Thomas Quinot
2005-07-26 12:00:00 +00:00
parent 7d6ca3e04c
commit 7ee28ff5d2

View File

@@ -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