mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 14:19:13 +02:00
LCL, grids, check for column index growing too big. Which may cause exception on trying to get invalid column width
git-svn-id: trunk@46237 -
This commit is contained in:
parent
4145473e3d
commit
187a700a04
@ -5516,11 +5516,20 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
while Offset>(integer(PtrUInt(AccumWidth[Index]))+GetColWidths(Index)-1) do
|
while Offset>(integer(PtrUInt(AccumWidth[Index]))+GetColWidths(Index)-1) do begin
|
||||||
Inc(Index);
|
Inc(Index);
|
||||||
|
if Index>=ColCount then begin
|
||||||
|
if AllowOutBoundEvents then
|
||||||
|
Index := ColCount-1
|
||||||
|
else
|
||||||
|
Index := -1;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
Rest:=Offset;
|
Rest:=Offset;
|
||||||
if Index<>0 then Rest:=Offset-integer(PtrUInt(AccumWidth[Index]));
|
if Index<>0 then
|
||||||
|
Rest:=Offset-integer(PtrUInt(AccumWidth[Index]));
|
||||||
|
|
||||||
end else begin
|
end else begin
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user