mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2026-01-06 23:21:03 +01:00
DebuglnEnter/Exit: protect against over-exit
git-svn-id: trunk@30514 -
This commit is contained in:
parent
3374fa1d8e
commit
66cdd0e590
@ -2280,6 +2280,7 @@ var
|
||||
NewLen: Integer;
|
||||
begin
|
||||
NewLen := DebugNestLvl * DebugLnNestLvlIndent;
|
||||
if NewLen < 0 then NewLen := 0;
|
||||
if (NewLen >= DebugLnMaxNestPrefixLen) then begin
|
||||
NewLen := DebugLnMaxNestPrefixLen;
|
||||
s := IntToStr(DebugNestLvl);
|
||||
@ -2344,6 +2345,7 @@ end;
|
||||
procedure DebugLnExit(const s: string);
|
||||
begin
|
||||
dec(DebugNestLvl);
|
||||
if DebugNestLvl < 0 then DebugNestLvl := 0;
|
||||
DebugLnNestCreatePrefix;
|
||||
if not DebugNestAtBOL then
|
||||
DebugLn;
|
||||
@ -2354,6 +2356,7 @@ end;
|
||||
procedure DebugLnExit(Args: array of const);
|
||||
begin
|
||||
dec(DebugNestLvl);
|
||||
if DebugNestLvl < 0 then DebugNestLvl := 0;
|
||||
DebugLnNestCreatePrefix;
|
||||
if not DebugNestAtBOL then
|
||||
DebugLn;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user