LCL, grids, check upper bound on adding string on cols/rows

git-svn-id: trunk@32037 -
This commit is contained in:
jesus 2011-08-23 00:04:46 +00:00
parent 8a68614069
commit 7ee3c9d29b

View File

@ -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;