Browse Source

* patch from Vincent to fix TReader.ReadCollection calling clear() logic

git-svn-id: trunk@11348 -
Almindor 17 years ago
parent
commit
3195d8bd79
1 changed files with 2 additions and 1 deletions
  1. 2 1
      rtl/objpas/classes/reader.inc

+ 2 - 1
rtl/objpas/classes/reader.inc

@@ -740,7 +740,8 @@ var
   Item: TCollectionItem;
 begin
   Collection.BeginUpdate;
-  Collection.Clear;
+  if not EndOfList then
+    Collection.Clear;
   while not EndOfList do begin
     ReadListBegin;
     Item := Collection.Add;