mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-06 20:26:13 +02:00
SynEdit: prevent a range check error when deleting the whole buffer
git-svn-id: trunk@40901 -
This commit is contained in:
parent
80d6f392bc
commit
36e370bd76
@ -332,7 +332,7 @@ begin
|
||||
Result := Column - Other.Column;
|
||||
if Result <> 0 then exit;
|
||||
{$PUSH}{$Q-} // Overflow is allowed to occur
|
||||
Result := PtrUint(self) - PtrUInt(Other);
|
||||
Result := Integer(PtrUint(self) - PtrUInt(Other));
|
||||
{$POP}
|
||||
end;
|
||||
|
||||
@ -345,7 +345,7 @@ begin
|
||||
Result := Priority - Other.Priority;
|
||||
if Result <> 0 then exit;
|
||||
{$PUSH}{$Q-} // Overflow is allowed to occur
|
||||
Result := PtrUint(self) - PtrUInt(Other);
|
||||
Result := Integer(PtrUint(self) - PtrUInt(Other));
|
||||
{$POP}
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user