* Small correction in POS (prevent moving out of buffer if offset<>1)

git-svn-id: trunk@33057 -
This commit is contained in:
michael 2016-02-06 12:17:13 +00:00
parent 6d051892e5
commit e2733c9a50

View File

@ -586,7 +586,7 @@ begin
Pos:=0;
if (Length(SubStr)>0) and (Offset>0) and (Offset<Length(Source)) then
begin
MaxLen:=Length(source)-Length(SubStr);
MaxLen:=Length(source)-Length(SubStr)-(OffSet-1);
i:=Offset-1;
pc:=@source[Offset];
while (i<=MaxLen) do