mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 20:00:16 +08:00
Try to make it easier to debug a memory read outside an array's bounds (issue #997) by putting each indexing on it's own source code line.
This commit is contained in:
@ -9164,6 +9164,7 @@ function TVirtualTreeColumns.GetColumnAndBounds(P: TPoint; var ColumnLeft, Colum
|
|||||||
|
|
||||||
var
|
var
|
||||||
I: Integer;
|
I: Integer;
|
||||||
|
J: Integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := InvalidColumn;
|
Result := InvalidColumn;
|
||||||
@ -9175,8 +9176,9 @@ begin
|
|||||||
if FHeader.Treeview.UseRightToLeftAlignment then
|
if FHeader.Treeview.UseRightToLeftAlignment then
|
||||||
Inc(ColumnLeft, FHeader.Treeview.ComputeRTLOffset(True));
|
Inc(ColumnLeft, FHeader.Treeview.ComputeRTLOffset(True));
|
||||||
|
|
||||||
for I := 0 to Count - 1 do
|
for I := 0 to Count - 1 do begin
|
||||||
with Items[FPositionToIndex[I]] do
|
J := FPositionToIndex[I];
|
||||||
|
with Items[J] do
|
||||||
if coVisible in FOptions then
|
if coVisible in FOptions then
|
||||||
begin
|
begin
|
||||||
ColumnRight := ColumnLeft + FWidth;
|
ColumnRight := ColumnLeft + FWidth;
|
||||||
@ -9187,6 +9189,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
ColumnLeft := ColumnRight;
|
ColumnLeft := ColumnRight;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user