a better fix for the tr_rand() crash experienced earlier today

This commit is contained in:
Charles Kerr
2007-07-26 03:57:45 +00:00
parent a4af933874
commit 31ac4e604a
2 changed files with 4 additions and 1 deletions

View File

@@ -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() );