Browse Source

修复RandUInt64的bug

tanghai 2 years ago
parent
commit
88265f8ede
1 changed files with 1 additions and 2 deletions
  1. 1 2
      Unity/Assets/Scripts/Core/Helper/RandomGenerator.cs

+ 1 - 2
Unity/Assets/Scripts/Core/Helper/RandomGenerator.cs

@@ -20,8 +20,7 @@ namespace ET
         {
             int r1 = RandInt32();
             int r2 = RandInt32();
-            
-            return ((ulong)r1 << 32) & (ulong)r2;
+            return ((ulong)r1 << 32) | (uint)r2;
         }
 
         public static int RandInt32()