mirror of
https://github.com/transmission/transmission.git
synced 2026-04-20 16:59:43 +01:00
a better fix for the tr_rand() crash experienced earlier today
This commit is contained in:
@@ -168,6 +168,9 @@ void tr_msg( int level, char * msg, ... )
|
||||
int tr_rand( int sup )
|
||||
{
|
||||
static int init = 0;
|
||||
|
||||
assert( sup > 0 );
|
||||
|
||||
if( !init )
|
||||
{
|
||||
srand( tr_date() );
|
||||
|
||||
Reference in New Issue
Block a user