diff options
author | MadCamel <madcamel@gmail.com> | 2009-08-29 20:43:53 -0400 |
---|---|---|
committer | MadCamel <madcamel@gmail.com> | 2009-08-29 20:45:59 -0400 |
commit | 837194519b2be29aa7665828e4d7cb8035fe1c3b (patch) | |
tree | 6aefce861fe537c58a585c5ec6e353331891e1ba /src/common/core.c | |
parent | de294e7c7d5ccf129eea3ce45c8023fa7b6d371d (diff) | |
download | tmwa-837194519b2be29aa7665828e4d7cb8035fe1c3b.tar.gz tmwa-837194519b2be29aa7665828e4d7cb8035fe1c3b.tar.bz2 tmwa-837194519b2be29aa7665828e4d7cb8035fe1c3b.tar.xz tmwa-837194519b2be29aa7665828e4d7cb8035fe1c3b.zip |
Converted to Mersenne Twister for random.
Randomerer! Also: Fixed a security problem. Can you find it?
Diffstat (limited to 'src/common/core.c')
-rw-r--r-- | src/common/core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/core.c b/src/common/core.c index 7267d8f..94a754b 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -13,6 +13,7 @@ #include "socket.h" #include "timer.h" #include "version.h" +#include "mt_rand.h" #ifdef MEMWATCH #include "memwatch.h" @@ -133,6 +134,8 @@ int main(int argc,char **argv) { int next; + mt_seed(time(NULL) ^ getpid() ^ getppid()); + Net_Init(); do_socket(); |