more cast
diff --git a/tommath_private.h b/tommath_private.h
index 260062f..ea0777e 100644
--- a/tommath_private.h
+++ b/tommath_private.h
@@ -156,7 +156,7 @@ typedef private_mp_word mp_word;
#define MP_IS_EVEN(a) (((a)->used == 0) || (((a)->dp[0] & 1u) == 0u))
#define MP_IS_ODD(a) (((a)->used > 0) && (((a)->dp[0] & 1u) == 1u))
-#define MP_SIZEOF_BITS(type) (CHAR_BIT * sizeof(type))
+#define MP_SIZEOF_BITS(type) ((size_t)CHAR_BIT * sizeof(type))
#define MP_MAXFAST (int)(1uL << (MP_SIZEOF_BITS(mp_word) - (2u * (size_t)MP_DIGIT_BIT)))
/* Minimum number of available digits in mp_int, MP_PREC >= MP_MIN_PREC */