mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 10:20:21 +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;
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user