Selaa lähdekoodia

* Fix from Bart for range check error. Fix issue #40240

Michaël Van Canneyt 2 vuotta sitten
vanhempi
commit
5442155f55
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      packages/fcl-base/src/fptemplate.pp

+ 1 - 0
packages/fcl-base/src/fptemplate.pp

@@ -382,6 +382,7 @@ Var
   SLen : Integer;
 
 begin
+  if (NChars=0) then Exit;
   SLen:=Length(S);
   SetLength(S,SLen+NChars);
   Move(P^,S[Slen+1],NChars);