From ea19211d2148ef9ef790b9892d831479056f919d Mon Sep 17 00:00:00 2001 From: Thom Wiggers Date: Wed, 27 Feb 2019 17:06:27 +0100 Subject: [PATCH] Cast size_t to DWORD on Windows --- common/randombytes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/randombytes.c b/common/randombytes.c index 0ffd74ee..82f2107c 100644 --- a/common/randombytes.c +++ b/common/randombytes.c @@ -90,7 +90,7 @@ static int randombytes_win32_randombytes(void *buf, const size_t n) { return -1; } - tmp = CryptGenRandom(ctx, n, (BYTE *)buf); + tmp = CryptGenRandom(ctx, (DWORD)n, (BYTE *)buf); if (tmp == FALSE) { return -1; }