summaryrefslogtreecommitdiffstats
path: root/mpi/mplogic.c
diff options
context:
space:
mode:
Diffstat (limited to 'mpi/mplogic.c')
-rw-r--r--mpi/mplogic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mpi/mplogic.c b/mpi/mplogic.c
index eae1ea47..5defba73 100644
--- a/mpi/mplogic.c
+++ b/mpi/mplogic.c
@@ -185,7 +185,7 @@ mp_err mpl_rsh(mp_int *a, mp_int *b, mp_digit d)
/* Now handle any remaining bit shifting */
if (bshift)
{
- mp_digit prev = 0, next, mask = (1 << bshift) - 1;
+ mp_digit prev = 0, next, mask = (convert(mp_digit, 1) << bshift) - 1;
mp_size ix;
/* 'mask' is a digit with the lower bshift bits set, the rest
@@ -229,7 +229,7 @@ mp_err mpl_lsh(mp_int *a, mp_int *b, mp_digit d)
if (bshift) {
mp_size ix;
- mp_digit prev = 0, next, mask = (1 << bshift) - 1;
+ mp_digit prev = 0, next, mask = (convert(mp_digit, 1) << bshift) - 1;
for (ix = 0; ix < USED(b); ix++) {
next = (DIGIT(b, ix) >> (DIGIT_BIT - bshift)) & mask;