mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-21 22:59:27 +02:00
LCL, grids, check upper bound on adding string on cols/rows
git-svn-id: trunk@32037 -
This commit is contained in:
parent
8a68614069
commit
7ee3c9d29b
@ -8850,7 +8850,7 @@ end;
|
||||
function TStringGridStrings.ConvertIndexLineCol(Index: Integer; var Line, Col: Integer): boolean;
|
||||
begin
|
||||
if FIsCol then
|
||||
if (Index < 0) or (Index > FGrid.RowCount) then
|
||||
if (Index < 0) or (Index >= FGrid.RowCount) then
|
||||
Result := False
|
||||
else begin
|
||||
Line := FIndex;
|
||||
@ -8858,7 +8858,7 @@ begin
|
||||
Result := True;
|
||||
end
|
||||
else
|
||||
if (Index < 0) or (Index > FGrid.ColCount) then
|
||||
if (Index < 0) or (Index >= FGrid.ColCount) then
|
||||
Result := False
|
||||
else begin
|
||||
Line := Index;
|
||||
|
Loading…
Reference in New Issue
Block a user