mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 20:49:24 +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;
|
||||
|
||||
while Offset>(integer(PtrUInt(AccumWidth[Index]))+GetColWidths(Index)-1) do
|
||||
while Offset>(integer(PtrUInt(AccumWidth[Index]))+GetColWidths(Index)-1) do begin
|
||||
Inc(Index);
|
||||
if Index>=ColCount then begin
|
||||
if AllowOutBoundEvents then
|
||||
Index := ColCount-1
|
||||
else
|
||||
Index := -1;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user