Browse Source

* more setlength

git-svn-id: trunk@35979 -
marco 8 years ago
parent
commit
a724265923
1 changed files with 2 additions and 2 deletions
  1. 2 2
      ide/weditor.pas

+ 2 - 2
ide/weditor.pas

@@ -1076,7 +1076,7 @@ begin
      BMFScan := NotFoundValue;
      BMFScan := NotFoundValue;
      exit;
      exit;
    end;
    end;
-  s2[0]:=chr(len);       { sets the length to that of the search String }
+  SetLength(s2,len);     { sets the length to that of the search String }
   found:=False;
   found:=False;
   numb:=pred(len);
   numb:=pred(len);
   While (not found) and (numb<size) do
   While (not found) and (numb<size) do
@@ -1185,7 +1185,7 @@ begin
      BMBScan := NotFoundValue;
      BMBScan := NotFoundValue;
      exit;
      exit;
    end;
    end;
-  s2[0]:=chr(len);       { sets the length to that of the search String }
+  SetLength(S2,len);      { sets the length to that of the search String }
   found:=False;
   found:=False;
   numb:=size-len;
   numb:=size-len;
   While (not found) and (numb>=0) do
   While (not found) and (numb>=0) do