Commit 3bc7055d authored by deuce's avatar deuce
Browse files

Fix again... this time correctly, but leave the hack in place as a warning for

future travellers.
parent e7106aab
......@@ -342,7 +342,7 @@ long DLLCALL xp_random(int n)
if(n<2)
return(0);
do {
f=(double)rand()/(double)RAND_MAX;
f=(double)rand()/(double)(RAND_MAX+1);
ret=(n*f);
} while ret==n;
......
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