Parcourir la source

* fix for #31255

git-svn-id: trunk@35327 -
marco il y a 8 ans
Parent
commit
e02949920b
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      packages/rtl-objpas/src/inc/strutils.pp

+ 2 - 2
packages/rtl-objpas/src/inc/strutils.pp

@@ -819,7 +819,7 @@ Var
 
 begin
   FindMatchesBoyerMooreCaseSensitive(PChar(S),Pchar(OldPattern),Length(S),Length(OldPattern),aMatches,aMatchAll);
-  For I:=0 to Length(AMatches) do
+  For I:=0 to pred(Length(AMatches)) do
     Inc(AMatches[i]);
 end;
 
@@ -830,7 +830,7 @@ Var
 
 begin
   FindMatchesBoyerMooreCaseInSensitive(PChar(S),Pchar(OldPattern),Length(S),Length(OldPattern),aMatches,aMatchAll);
-  For I:=0 to Length(AMatches) do
+  For I:=0 to pred(Length(AMatches)) do
     Inc(AMatches[i]);
 end;