mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 10:59:29 +02:00
FpDebug: Fix mem-leak
git-svn-id: trunk@65167 -
This commit is contained in:
parent
43ae6df320
commit
a1b4044047
@ -2865,10 +2865,13 @@ function TFpPascalExpressionPartOperatorPlusMinus.DoGetResultValue: TFpValue;
|
||||
(AOtherVal.TypeInfo.TypeInfo.ReadSize(nil, s2)) and
|
||||
(s1 = s2)
|
||||
then begin
|
||||
if s1 <> (APointerVal.Member[1].DataAddress.Address - APointerVal.DataAddress.Address) then begin
|
||||
TmpVal := APointerVal.Member[1];
|
||||
if s1 <> (TmpVal.DataAddress.Address - APointerVal.DataAddress.Address) then begin
|
||||
TmpVal.ReleaseReference;
|
||||
debugln('Size mismatch for pointer math');
|
||||
exit;
|
||||
end;
|
||||
TmpVal.ReleaseReference;
|
||||
Idx := APointerVal.AsCardinal - AOtherVal.AsCardinal;
|
||||
if SizeToFullBytes(s1) > 0 then begin
|
||||
m := Idx mod SizeToFullBytes(s1);
|
||||
|
Loading…
Reference in New Issue
Block a user