瀏覽代碼

* 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;