Browse Source

* GetRandomBytes calls randomize only once, now thread safe too

git-svn-id: trunk@11125 -
michael 17 years ago
parent
commit
d419c1078a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      rtl/objpas/sysutils/sysutils.inc

+ 1 - 1
rtl/objpas/sysutils/sysutils.inc

@@ -582,8 +582,8 @@ begin
   P:=@Buf;
   P:=@Buf;
   If Not GUIDCalledRandomize then
   If Not GUIDCalledRandomize then
     begin
     begin
-    GUIDCalledRandomize:=True;
     Randomize;
     Randomize;
+    GUIDCalledRandomize:=True;
     end;
     end;
   For I:=0 to NBytes-1 do
   For I:=0 to NBytes-1 do
     P[i]:=Random(256);
     P[i]:=Random(256);