Commit 537e6712 authored by yoogx's avatar yoogx

* Minor code reorganization

parent b9e02e73
......@@ -182,12 +182,10 @@ package body PolyORB_HI.Messages is
Stream.Last := 0;
end if;
if Item'Length > Stream.Content'Last - Stream.Last then
raise Program_Error;
if Item'Length <= Stream.Content'Last - Stream.Last then
Stream.Content (Stream.Last + 1 .. Stream.Last + Item'Length) := Item;
Stream.Last := Stream.Last + Item'Length;
end if;
Stream.Content (Stream.Last + 1 .. Stream.Last + Item'Length) := Item;
Stream.Last := Stream.Last + Item'Length;
end Write;
---------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment