فهرست منبع

* fix for 15597. Added returnvalue to early-out exit().

git-svn-id: trunk@14818 -
marco 15 سال پیش
والد
کامیت
2c149e805a
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      rtl/objpas/classes/lists.inc

+ 1 - 1
rtl/objpas/classes/lists.inc

@@ -174,7 +174,7 @@ function TFPList.Expand: TFPList;
 var
   IncSize : Longint;
 begin
-  if FCount < FCapacity then exit;
+  if FCount < FCapacity then exit(self);
   IncSize := 4;
   if FCapacity > 3 then IncSize := IncSize + 4;
   if FCapacity > 8 then IncSize := IncSize+8;