| Index: core/src/fxcrt/fx_extension.cpp
|
| diff --git a/core/src/fxcrt/fx_extension.cpp b/core/src/fxcrt/fx_extension.cpp
|
| index 456e6bd7f3eda6cac47b86ac765f0cf5cfa66d56..31f645ae0ffa98e35d316bbf87399d14d7ea9c29 100644
|
| --- a/core/src/fxcrt/fx_extension.cpp
|
| +++ b/core/src/fxcrt/fx_extension.cpp
|
| @@ -332,9 +332,12 @@ void FX_Random_GenerateBase(FX_DWORD* pBuffer, int32_t iCount) {
|
| FX_HashCode_String_GetA((const FX_CHAR*)&st2, sizeof(st2), TRUE);
|
| ::srand((dwHash1 << 16) | (FX_DWORD)dwHash2);
|
| #else
|
| - time_t tmLast = time(NULL), tmCur;
|
| - while ((tmCur = time(NULL)) == tmLast)
|
| - ;
|
| + time_t tmLast = time(NULL);
|
| + time_t tmCur;
|
| + while ((tmCur = time(NULL)) == tmLast) {
|
| + continue;
|
| + }
|
| +
|
| ::srand((tmCur << 16) | (tmLast & 0xFFFF));
|
| #endif
|
| while (iCount-- > 0) {
|
|
|