diff --git a/components/lazutils/lazcollections.pas b/components/lazutils/lazcollections.pas index 9784d8eb38..ba29341635 100644 --- a/components/lazutils/lazcollections.pas +++ b/components/lazutils/lazcollections.pas @@ -211,7 +211,7 @@ var begin FMonitor.Enter; try - c:=Max(FQueueSize + ADelta, FTotalItemsPushed - FTotalItemsPopped); + c:=Max(FQueueSize + ADelta, Integer(FTotalItemsPushed - FTotalItemsPopped)); setlength(NewList, c); i:=FTotalItemsPopped; while i < FTotalItemsPushed do begin