소스 검색

* 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);