diff --git a/wolfcrypt/src/integer.c b/wolfcrypt/src/integer.c index 1751bd85b..5dd9e15fc 100644 --- a/wolfcrypt/src/integer.c +++ b/wolfcrypt/src/integer.c @@ -1446,10 +1446,10 @@ int mp_set (mp_int * a, mp_digit b) /* check if a bit is set */ int mp_is_bit_set (mp_int *a, mp_digit b) { - int i = (int)(b / DIGIT_BIT); /* word index */ - int s = b % DIGIT_BIT; /* bit index */ + mp_digit i = b / DIGIT_BIT; /* word index */ + mp_digit s = b % DIGIT_BIT; /* bit index */ - if (a->used <= i) { + if ((mp_digit)a->used <= i) { /* no words avaialable at that bit count */ return 0; }