Browse Source

* Actually use SubStrLen in pos() function. Fixes issue #41350

Michaël Van Canneyt 1 week ago
parent
commit
7dfd188a9b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      rtl/java/jastrings.inc

+ 1 - 1
rtl/java/jastrings.inc

@@ -764,7 +764,7 @@ var
 begin
   Pos:=0;
   SubstrLen:=Length(SubStr);
-  if (Length(SubStr)>0) and (Offset>0) and (Offset<=Length(Source)) then
+  if (SubstrLen>0) and (Offset>0) and (Offset<=Length(Source)) then
    begin
      MaxLen:=Length(source)-Length(SubStr);
      i:=Offset-1;