Fix compiler warning in win32_urandom(): explicit cast to DWORD in
CryptGenRandom()
This commit is contained in:
parent
f558778f07
commit
0c083461a5
|
@ -50,7 +50,7 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
|
|||
while (size > 0)
|
||||
{
|
||||
chunk = size > INT_MAX ? INT_MAX : size;
|
||||
if (!CryptGenRandom(hCryptProv, chunk, buffer))
|
||||
if (!CryptGenRandom(hCryptProv, (DWORD)chunk, buffer))
|
||||
{
|
||||
/* CryptGenRandom() failed */
|
||||
if (raise)
|
||||
|
|
Loading…
Reference in New Issue