From 9bac5dd95437478c5aa40a960e422873a7b60c72 Mon Sep 17 00:00:00 2001 From: Karel Miko Date: Mon, 3 Dec 2018 12:13:27 +0100 Subject: [PATCH] another msvc warnings: 32-bit shift implicitly converted to 64 bits --- bn_mp_exptmod_fast.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 bn_mp_exptmod_fast.c diff --git a/bn_mp_exptmod_fast.c b/bn_mp_exptmod_fast.c old mode 100644 new mode 100755 index 0d01e38..a63ebd5 --- a/bn_mp_exptmod_fast.c +++ b/bn_mp_exptmod_fast.c @@ -165,15 +165,15 @@ int mp_exptmod_fast(const mp_int *G, const mp_int *X, const mp_int *P, mp_int *Y } /* compute the value at M[1<<(winsize-1)] by squaring M[1] (winsize-1) times */ - if ((err = mp_copy(&M[1], &M[1 << (winsize - 1)])) != MP_OKAY) { + if ((err = mp_copy(&M[1], &M[(size_t)1 << (winsize - 1)])) != MP_OKAY) { goto LBL_RES; } for (x = 0; x < (winsize - 1); x++) { - if ((err = mp_sqr(&M[1 << (winsize - 1)], &M[1 << (winsize - 1)])) != MP_OKAY) { + if ((err = mp_sqr(&M[(size_t)1 << (winsize - 1)], &M[(size_t)1 << (winsize - 1)])) != MP_OKAY) { goto LBL_RES; } - if ((err = redux(&M[1 << (winsize - 1)], P, mp)) != MP_OKAY) { + if ((err = redux(&M[(size_t)1 << (winsize - 1)], P, mp)) != MP_OKAY) { goto LBL_RES; } }