Explorar el Código

修复RandUInt64的bug

tanghai hace 2 años
padre
commit
88265f8ede
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  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()