Explorar el Código

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

git-svn-id: trunk@11348 -
Almindor hace 17 años
padre
commit
3195d8bd79
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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;