diff options
author | Filippos Karapetis | 2007-12-06 18:48:44 +0000 |
---|---|---|
committer | Filippos Karapetis | 2007-12-06 18:48:44 +0000 |
commit | d3a9cfc2cbcbdc8e8676bffb64df1ac9b6f2f16e (patch) | |
tree | 38a7647400f32be4c02e96e9cafb0ccb888d356a | |
parent | 99acbe79af5603e86a0b2fc925520fa6dc3c890b (diff) | |
download | scummvm-rg350-d3a9cfc2cbcbdc8e8676bffb64df1ac9b6f2f16e.tar.gz scummvm-rg350-d3a9cfc2cbcbdc8e8676bffb64df1ac9b6f2f16e.tar.bz2 scummvm-rg350-d3a9cfc2cbcbdc8e8676bffb64df1ac9b6f2f16e.zip |
Reverted commit #29733, as RandomSource() is called before g_system is initialized (e.g. from sound/fmopl.cpp)
svn-id: r29736
-rw-r--r-- | common/util.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/common/util.cpp b/common/util.cpp index 46b5acf502..41f35a8a0e 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -154,8 +154,11 @@ void hexdump(const byte * data, int len, int bytesPerLine) { RandomSource::RandomSource() { // Use system time as RNG seed. Normally not a good idea, if you are using // a RNG for security purposes, but good enough for our purposes. - assert(g_system); - uint32 seed = g_system->getMillis(); +#if defined (__SYMBIAN32__) && defined (__WINS__) + uint32 seed = 0; // Symbian produces RT crash on time(0) +#else + uint32 seed = time(0); +#endif setSeed(seed); } |