mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 08:59:13 +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);
|
procedure TSynPasSyn.SmartCloseBeginEndBlocks(SearchFor: TPascalCodeFoldBlockType);
|
||||||
var
|
var
|
||||||
i: Integer;
|
i, nc: Integer;
|
||||||
t: TPascalCodeFoldBlockType;
|
t: TPascalCodeFoldBlockType;
|
||||||
begin
|
begin
|
||||||
// Close unfinished blocks, IF the expected type is found
|
// Close unfinished blocks, IF the expected type is found
|
||||||
@ -2829,7 +2829,8 @@ begin
|
|||||||
|
|
||||||
while i > 0 do begin
|
while i > 0 do begin
|
||||||
EndCodeFoldBlockLastLine;
|
EndCodeFoldBlockLastLine;
|
||||||
if FCatchNodeInfo then
|
nc := FNodeInfoCount;
|
||||||
|
if FCatchNodeInfo and (FNodeInfoCount > nc) then
|
||||||
exclude(FNodeInfoList[FNodeInfoCount-1].FoldAction, sfaMarkup);
|
exclude(FNodeInfoList[FNodeInfoCount-1].FoldAction, sfaMarkup);
|
||||||
dec(i);
|
dec(i);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user