Fix compiler warning in win32_urandom(): explicit cast to DWORD in

CryptGenRandom()
This commit is contained in:
Victor Stinner 2013-11-15 23:26:25 +01:00
parent f558778f07
commit 0c083461a5
1 changed files with 1 additions and 1 deletions

View File

@ -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)