Commit 8d0ecee0 authored by deuce's avatar deuce
Browse files

Since sbbs_random() uses xp_random() we should call xp_randomize() here

as well.

This fixes a bug where /dev/urandom is not a character special file
(on FreeBSD it's a symlink) and there is a random() function available.

In this case, the same sequence of random numbers was used for each process
(most noticable with jsexec).
parent 218766c5
......@@ -278,6 +278,7 @@ DLLEXPORT void DLLCALL sbbs_srand()
DWORD seed = time(NULL) ^ (DWORD)GetCurrentThreadId();
#if defined(HAS_DEV_RANDOM) && defined(RANDOM_DEV)
int rf;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment