codetools: FixFPDocFragment: fixed endless loop

git-svn-id: trunk@34928 -
This commit is contained in:
mattias 2012-01-25 15:19:02 +00:00
parent 1710736e19
commit 4d4992d4bf

View File

@ -502,7 +502,7 @@ begin
case p^ of case p^ of
#0..#8,#11,#12,#14..#31,#127: #0..#8,#11,#12,#14..#31,#127:
begin begin
if (p^=#0) and (p-PChar(Fragment)=length(Fragment)) then if (p^=#0) and (p-PChar(Fragment)>=length(Fragment)) then
begin begin
// reached end of fragment // reached end of fragment
break; break;
@ -520,7 +520,9 @@ begin
ParseAmpersand; ParseAmpersand;
'"','''': '"','''':
if not AllowTags then if not AllowTags then
HandleSpecialChar; HandleSpecialChar
else
inc(p);
else else
inc(p); inc(p);
end; end;