mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 22:19:12 +02:00
FpDebug: fix :flatten intrinsic, if first value is array. Don't add a data address without adding an item.
This commit is contained in:
parent
4de7b7574a
commit
2c5dd45f28
@ -3223,8 +3223,6 @@ var
|
|||||||
Res.Flags := Res.Flags + [vfArrayOfVariant];
|
Res.Flags := Res.Flags + [vfArrayOfVariant];
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if ResIdx < 0 then
|
|
||||||
ResIdx := Res.FList.Count; // the index for the firs element of the array (if any)
|
|
||||||
|
|
||||||
if IsNilLoc(DA) or
|
if IsNilLoc(DA) or
|
||||||
( (not IsReadableLoc(DA)) and ((not DoExpArray) or HasDtAddr) )
|
( (not IsReadableLoc(DA)) and ((not DoExpArray) or HasDtAddr) )
|
||||||
@ -3233,17 +3231,18 @@ var
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
s := Seen.Add(DA, ResIdx);
|
if DoExpArray then begin
|
||||||
if DoExpArray then
|
Result := FlattenArray(ACurrentVal, AMapExpr, ACurDepth + 1, ACurKeyIdx, ACurKey, AnExpandDepth);
|
||||||
Result := FlattenArray(ACurrentVal, AMapExpr, ACurDepth + 1, ACurKeyIdx, ACurKey, AnExpandDepth)
|
end
|
||||||
else
|
else begin
|
||||||
|
s := Seen.Add(DA, ResIdx);
|
||||||
Result := FlattenRecurse(ACurrentVal, ACurDepth+1, ACurKey);
|
Result := FlattenRecurse(ACurrentVal, ACurDepth+1, ACurKey);
|
||||||
|
if (iffShowSeen in Flags) then
|
||||||
|
Seen.Data[s] := -1-ResIdx
|
||||||
|
else
|
||||||
|
Seen.Delete(s);
|
||||||
|
end;
|
||||||
ReleaseRefAndNil(ACurrentVal);
|
ReleaseRefAndNil(ACurrentVal);
|
||||||
if (iffShowSeen in Flags) then
|
|
||||||
Seen.Data[s] := -1-ResIdx
|
|
||||||
else
|
|
||||||
Seen.Delete(s);
|
|
||||||
|
|
||||||
finally
|
finally
|
||||||
DisplayVal.ReleaseReference;
|
DisplayVal.ReleaseReference;
|
||||||
|
Loading…
Reference in New Issue
Block a user