mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-12 18:40:27 +01:00
tweetNaCL: fix winrandom
problem: random byte generation on windows got stuck in an infinite loop solution: the failure test is incorrect. Change it
This commit is contained in:
parent
571ee21eef
commit
0a0b9fd760
@ -22,7 +22,7 @@ void randombytes(unsigned char *x,unsigned long long xlen)
|
|||||||
if (xlen < 1048576) i = (unsigned) xlen; else i = 1048576;
|
if (xlen < 1048576) i = (unsigned) xlen; else i = 1048576;
|
||||||
|
|
||||||
ret = CryptGenRandom(hProvider, i, x);
|
ret = CryptGenRandom(hProvider, i, x);
|
||||||
if (ret != FALSE) {
|
if (ret == FALSE) {
|
||||||
Sleep(1);
|
Sleep(1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user