mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 09:38: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];
|
||||
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
|
||||
( (not IsReadableLoc(DA)) and ((not DoExpArray) or HasDtAddr) )
|
||||
@ -3233,17 +3231,18 @@ var
|
||||
exit;
|
||||
end;
|
||||
|
||||
s := Seen.Add(DA, ResIdx);
|
||||
if DoExpArray then
|
||||
Result := FlattenArray(ACurrentVal, AMapExpr, ACurDepth + 1, ACurKeyIdx, ACurKey, AnExpandDepth)
|
||||
else
|
||||
if DoExpArray then begin
|
||||
Result := FlattenArray(ACurrentVal, AMapExpr, ACurDepth + 1, ACurKeyIdx, ACurKey, AnExpandDepth);
|
||||
end
|
||||
else begin
|
||||
s := Seen.Add(DA, ResIdx);
|
||||
Result := FlattenRecurse(ACurrentVal, ACurDepth+1, ACurKey);
|
||||
|
||||
if (iffShowSeen in Flags) then
|
||||
Seen.Data[s] := -1-ResIdx
|
||||
else
|
||||
Seen.Delete(s);
|
||||
end;
|
||||
ReleaseRefAndNil(ACurrentVal);
|
||||
if (iffShowSeen in Flags) then
|
||||
Seen.Data[s] := -1-ResIdx
|
||||
else
|
||||
Seen.Delete(s);
|
||||
|
||||
finally
|
||||
DisplayVal.ReleaseReference;
|
||||
|
Loading…
Reference in New Issue
Block a user