sas             Sun Mar 30 22:24:18 2003 EDT

  Modified files:              
    /php4/ext/standard  lcg.c 
  Log:
  Ensure that the seed function has been called, even if we are used by
  another module's request init function.
  
  Noticed by: [EMAIL PROTECTED]
  
  
Index: php4/ext/standard/lcg.c
diff -u php4/ext/standard/lcg.c:1.34 php4/ext/standard/lcg.c:1.35
--- php4/ext/standard/lcg.c:1.34        Tue Dec 31 11:07:45 2002
+++ php4/ext/standard/lcg.c     Sun Mar 30 22:24:18 2003
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: lcg.c,v 1.34 2002/12/31 16:07:45 sebastian Exp $ */
+/* $Id: lcg.c,v 1.35 2003/03/31 03:24:18 sas Exp $ */
 
 #include "php.h"
 #include "php_lcg.h"
@@ -61,6 +61,10 @@
 {
        php_int32 q;
        php_int32 z;
+       
+       if (!LCG(seeded)) {
+               lcg_seed(TSRMLS_C);
+       }
 
        MODMULT(53668, 40014, 12211, 2147483563L, LCG(s1));
        MODMULT(52774, 40692, 3791, 2147483399L, LCG(s2));



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to