mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 23:01:55 +02:00
* Small correction in POS (prevent moving out of buffer if offset<>1)
git-svn-id: trunk@33057 -
This commit is contained in:
parent
6d051892e5
commit
e2733c9a50
@ -586,7 +586,7 @@ begin
|
|||||||
Pos:=0;
|
Pos:=0;
|
||||||
if (Length(SubStr)>0) and (Offset>0) and (Offset<Length(Source)) then
|
if (Length(SubStr)>0) and (Offset>0) and (Offset<Length(Source)) then
|
||||||
begin
|
begin
|
||||||
MaxLen:=Length(source)-Length(SubStr);
|
MaxLen:=Length(source)-Length(SubStr)-(OffSet-1);
|
||||||
i:=Offset-1;
|
i:=Offset-1;
|
||||||
pc:=@source[Offset];
|
pc:=@source[Offset];
|
||||||
while (i<=MaxLen) do
|
while (i<=MaxLen) do
|
||||||
|
Loading…
Reference in New Issue
Block a user