mtprocs: fixed CalcBlockSize when MinBlockSize<1, bug #30612

git-svn-id: trunk@52986 -
This commit is contained in:
mattias 2016-09-18 09:30:24 +00:00
parent e0b8bceb8e
commit c69f972142

View File

@ -708,6 +708,7 @@ begin
BlockCount:=ProcThreadPool.MaxThreadCount;
BlockSize:=(LoopLength div BlockCount);
if (BlockSize<MinBlockSize) then BlockSize:=MinBlockSize;
if BlockSize<1 then BlockSize:=1;
BlockCount:=((LoopLength-1) div BlockSize)+1;
end;