Author: rblasch
Date: Sat Aug  9 04:56:29 2008
New Revision: 30139

Modified:
   trunk/src/utils.c

Log:
[src] Apply bitmask before casting.

Otherwise the MSVC "convert to smaller type check" may trigger.


Modified: trunk/src/utils.c
==============================================================================
--- trunk/src/utils.c   (original)
+++ trunk/src/utils.c   Sat Aug  9 04:56:29 2008
@@ -348,8 +348,8 @@
 _srand48(long seed)
 {
     last_rand[0] = SEED_LO;
-    last_rand[1] = (unsigned short)seed & 0xffff;
-    last_rand[2] = (unsigned short)(seed >> 16) & 0xffff;
+    last_rand[1] = (unsigned short)(seed & 0xffff);
+    last_rand[2] = (unsigned short)((seed >> 16) & 0xffff);
     /*
      * reinit a, c if changed by lcong48()
      */

Reply via email to