mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-05 09:00:25 +02:00
IDE: fix potential overflow in compare function
git-svn-id: trunk@61153 -
This commit is contained in:
parent
f7c82fb295
commit
4e7db82b52
@ -75,7 +75,9 @@ var
|
||||
begin
|
||||
Form1 := TNonFormProxyDesignerForm(Data1) as INonFormDesigner;
|
||||
Form2 := TNonFormProxyDesignerForm(Data2) as INonFormDesigner;
|
||||
{$PUSH}{$Q-} // Overflow is allowed to occur
|
||||
Result := Integer(PtrInt(Form1.LookupRoot) - PtrInt(Form2.LookupRoot));
|
||||
{$POP}
|
||||
end;
|
||||
|
||||
function CompareLookupRootAndNonFormDesignerForm(Key, Data: Pointer): integer;
|
||||
@ -85,7 +87,9 @@ var
|
||||
begin
|
||||
LookupRoot := TComponent(Key);
|
||||
Form := TNonFormProxyDesignerForm(Data) as INonFormDesigner;
|
||||
{$PUSH}{$Q-} // Overflow is allowed to occur
|
||||
Result := Integer(PtrInt(LookupRoot) - PtrInt(Form.LookupRoot));
|
||||
{$POP}
|
||||
end;
|
||||
|
||||
{ TCustomNonFormDesignerForm }
|
||||
|
Loading…
Reference in New Issue
Block a user