mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2026-01-06 04:40:35 +01:00
IDE: SynEdit: fix potential rangecheck in compare function
git-svn-id: trunk@61151 -
This commit is contained in:
parent
4d8827642a
commit
1e08f29dd0
@ -75,7 +75,7 @@ var
|
||||
begin
|
||||
Form1 := TNonFormProxyDesignerForm(Data1) as INonFormDesigner;
|
||||
Form2 := TNonFormProxyDesignerForm(Data2) as INonFormDesigner;
|
||||
Result := PtrInt(Form1.LookupRoot) - PtrInt(Form2.LookupRoot);
|
||||
Result := Integer(PtrInt(Form1.LookupRoot) - PtrInt(Form2.LookupRoot));
|
||||
end;
|
||||
|
||||
function CompareLookupRootAndNonFormDesignerForm(Key, Data: Pointer): integer;
|
||||
@ -85,7 +85,7 @@ var
|
||||
begin
|
||||
LookupRoot := TComponent(Key);
|
||||
Form := TNonFormProxyDesignerForm(Data) as INonFormDesigner;
|
||||
Result := PtrInt(LookupRoot) - PtrInt(Form.LookupRoot);
|
||||
Result := Integer(PtrInt(LookupRoot) - PtrInt(Form.LookupRoot));
|
||||
end;
|
||||
|
||||
{ TCustomNonFormDesignerForm }
|
||||
|
||||
@ -437,7 +437,7 @@ end;
|
||||
|
||||
function TSourceMark.Compare(OtherMark: TSourceMark): integer;
|
||||
begin
|
||||
Result:=PtrInt(SourceEditorID)-PtrInt(OtherMark.SourceEditorID);
|
||||
Result:=ComparePointers(Pointer(SourceEditorID), Pointer(OtherMark.SourceEditorID));
|
||||
if Result<>0 then exit;
|
||||
Result:=Line-OtherMark.Line;
|
||||
if Result<>0 then exit;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user