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; function TStringGridStrings.ConvertIndexLineCol(Index: Integer; var Line, Col: Integer): boolean;
begin begin
if FIsCol then if FIsCol then
if (Index < 0) or (Index > FGrid.RowCount) then if (Index < 0) or (Index >= FGrid.RowCount) then
Result := False Result := False
else begin else begin
Line := FIndex; Line := FIndex;
@ -8858,7 +8858,7 @@ begin
Result := True; Result := True;
end end
else else
if (Index < 0) or (Index > FGrid.ColCount) then if (Index < 0) or (Index >= FGrid.ColCount) then
Result := False Result := False
else begin else begin
Line := Index; Line := Index;