|
@@ -772,14 +772,18 @@ function CollectionsEqual(C1, C2: TCollection; Owner1, Owner2: TComponent): Bool
|
|
|
if (c1.classtype<>c2.classtype) or
|
|
|
(c1.count<>c2.count) then
|
|
|
exit;
|
|
|
-
|
|
|
+ if c1.count = 0 then
|
|
|
+ begin
|
|
|
+ result:= true;
|
|
|
+ exit;
|
|
|
+ end;
|
|
|
s1:=tmemorystream.create;
|
|
|
try
|
|
|
s2:=tmemorystream.create;
|
|
|
try
|
|
|
stream_collection(s1,c1,owner1);
|
|
|
stream_collection(s2,c2,owner2);
|
|
|
- result:=(s1.size=s2.size) and (CompareChar(s1.memory,s2.memory,s1.size)=0);
|
|
|
+ result:=(s1.size=s2.size) and (CompareChar(s1.memory^,s2.memory^,s1.size)=0);
|
|
|
finally
|
|
|
s2.free;
|
|
|
end;
|