SynEdit: prevent a range check error when deleting the whole buffer

git-svn-id: trunk@40901 -
This commit is contained in:
juha 2013-04-27 14:24:43 +00:00
parent 80d6f392bc
commit 36e370bd76

View File

@ -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;