Needed to lock/unlock the random generator mutex when getting a random number via f_getRandomUINT32.
git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@586 0109f412-320b-0410-ab79-c3e0c5ffbbe6
This commit is contained in:
@@ -1813,7 +1813,13 @@ FLMUINT32 FLMAPI f_getRandomUINT32(
|
||||
FLMUINT32 ui32Low,
|
||||
FLMUINT32 ui32High)
|
||||
{
|
||||
return( gv_pRandomGenerator->getUINT32( ui32Low, ui32High));
|
||||
FLMUINT32 ui32Value;
|
||||
|
||||
f_mutexLock( gv_hRandomGenMutex);
|
||||
ui32Value = gv_pRandomGenerator->getUINT32( ui32Low, ui32High);
|
||||
f_mutexUnlock( gv_hRandomGenMutex);
|
||||
|
||||
return( ui32Value);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user