Browse Source

* Patch from Bart B to fix TPath.GetRandomFileName. Fixes issue #40528

Michaël Van Canneyt 1 year ago
parent
commit
3c4a2c7380
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/vcl-compat/src/system.ioutils.pp

+ 1 - 1
packages/vcl-compat/src/system.ioutils.pp

@@ -1060,7 +1060,7 @@ begin
   Result:=''; // DO NOT LOCALIZE
   Result:=''; // DO NOT LOCALIZE
   SetLength(Result,FNLen);
   SetLength(Result,FNLen);
   for i:=1 to FNLen do
   for i:=1 to FNLen do
-    if i = DotAt then
+    if i <> DotAt then
       begin
       begin
       C:=Random(3);
       C:=Random(3);
       Result[I]:=SelectChars[C][1+Random(SelectLengths[C])];
       Result[I]:=SelectChars[C][1+Random(SelectLengths[C])];