Selaa lähdekoodia

修复RandUInt64的bug

tanghai 2 vuotta sitten
vanhempi
commit
88265f8ede
1 muutettua tiedostoa jossa 1 lisäystä ja 2 poistoa
  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()