浏览代码

* GetRandomBytes calls randomize only once, now thread safe too

git-svn-id: trunk@11125 -
michael 17 年之前
父节点
当前提交
d419c1078a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      rtl/objpas/sysutils/sysutils.inc

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

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