mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 11:19:26 +02:00
SynEdit, Pas-Highlighter: fixed a crash, by pointer range-check violation / random mem access
git-svn-id: trunk@19957 -
This commit is contained in:
parent
9274d85e5b
commit
9e7e2cfd0c
@ -2810,7 +2810,7 @@ end;
|
||||
|
||||
procedure TSynPasSyn.SmartCloseBeginEndBlocks(SearchFor: TPascalCodeFoldBlockType);
|
||||
var
|
||||
i: Integer;
|
||||
i, nc: Integer;
|
||||
t: TPascalCodeFoldBlockType;
|
||||
begin
|
||||
// Close unfinished blocks, IF the expected type is found
|
||||
@ -2829,7 +2829,8 @@ begin
|
||||
|
||||
while i > 0 do begin
|
||||
EndCodeFoldBlockLastLine;
|
||||
if FCatchNodeInfo then
|
||||
nc := FNodeInfoCount;
|
||||
if FCatchNodeInfo and (FNodeInfoCount > nc) then
|
||||
exclude(FNodeInfoList[FNodeInfoCount-1].FoldAction, sfaMarkup);
|
||||
dec(i);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user