Commit 0a0b9fd7 authored by Anonymous Maarten's avatar Anonymous Maarten

tweetNaCL: fix winrandom

problem: random byte generation on windows got stuck in an infinite loop
solution: the failure test is incorrect. Change it
parent 571ee21e
......@@ -22,7 +22,7 @@ void randombytes(unsigned char *x,unsigned long long xlen)
if (xlen < 1048576) i = (unsigned) xlen; else i = 1048576;
ret = CryptGenRandom(hProvider, i, x);
if (ret != FALSE) {
if (ret == FALSE) {
Sleep(1);
continue;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment