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:
Anonymous Maarten 2015-10-25 03:43:24 +01:00
parent 571ee21eef
commit 0a0b9fd760

View File

@ -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;
} }