From 10fe3d6b2867cd3599ee39fa17a3a34cc4bc3acc Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 1 Jul 2009 19:24:43 -0400 Subject: [PATCH] Bug Fix - random broken - Moved srandom/srand call back to where it was in 1.7.1. --- src/Context.cpp | 2 ++ src/main.cpp | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/src/Context.cpp b/src/Context.cpp index c9bc1bf91..45bcf418e 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -53,11 +53,13 @@ Context::Context () , inShadow (false) { // Set up randomness. +/* #ifdef HAVE_SRANDOM srandom (time (NULL)); #else srand (time (NULL)); #endif +*/ } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/main.cpp b/src/main.cpp index 877147074..bb8127b45 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -32,6 +32,13 @@ Context context; int main (int argc, char** argv) { + // Set up randomness. +#ifdef HAVE_SRANDOM + srandom (time (NULL)); +#else + srand (time (NULL)); +#endif + int status = 0; try