codetools: fixed ReadPrioAtomSafe when cleanpos at end of atom

git-svn-id: trunk@58274 -
This commit is contained in:
mattias 2018-06-14 20:46:56 +00:00
parent 4da68d03f2
commit e6360472a3

View File

@ -1824,14 +1824,17 @@ begin
// first atom of node is behind CleanPos => try prior node // first atom of node is behind CleanPos => try prior node
Node:=Node.Prior; Node:=Node.Prior;
until false; until false;
if CurPos.EndPos>=CleanPos then begin if CurPos.EndPos>CleanPos then begin
CurPos:=CleanAtomPosition; CurPos:=CleanAtomPosition;
exit; exit;
end; end;
if CurPos.EndPos=CleanPos then
exit;
repeat repeat
ReadNextAtom; ReadNextAtom;
if CurPos.EndPos>=CleanPos then begin if CurPos.EndPos>=CleanPos then begin
UndoReadNextAtom; if CurPos.EndPos>CleanPos then
UndoReadNextAtom;
exit; exit;
end; end;
until false; until false;