From 2db4921255c1827d1fbf5eeb95caaefaa735e02d Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 10 Sep 2019 22:56:31 +0000 Subject: [PATCH] Merged revision(s) 61856 #3d1601903e from trunk: LeakView: fix/improve pasting address only traces ........ git-svn-id: branches/fixes_2_0@61858 - --- components/leakview/leakinfo.pas | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/components/leakview/leakinfo.pas b/components/leakview/leakinfo.pas index 51d8dc0a66..86c51ba96b 100644 --- a/components/leakview/leakinfo.pas +++ b/components/leakview/leakinfo.pas @@ -403,9 +403,12 @@ begin do inc(i); if (i > l) and CheckOnlyLineStart then exit(True); - if (i > l) or (SubStr[i] <> ' ') then exit; + if (i <= l) and (SubStr[i] <> ' ') then exit; + while (i <= l) and (SubStr[i] = ' ') do inc(i); + Result := (Pos('line', SubStr) > 0) - or CheckOnlyLineStart; + or CheckOnlyLineStart + or (i > l); end; end; @@ -492,7 +495,7 @@ begin while TrcIndex < Trc.Count do begin if PosInTrc(CallTracePrefix) or - ( (TrcIndex < Trc.Count-1) and IsHeaderLine(TrcIndex) and IsTraceLine(TrcIndex+1) ) or + ( (TrcIndex < Trc.Count-1) and IsHeaderLine(TrcIndex, True) and IsTraceLine(TrcIndex+1) ) or IsTraceLine(TrcIndex) then begin st := TStackTrace.Create;