more cast
diff --git a/tommath_private.h b/tommath_private.h
index 2832690..45aad4e 100644
--- a/tommath_private.h
+++ b/tommath_private.h
@@ -157,7 +157,7 @@ extern void MP_FREE(void *mem, size_t size);
#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)))
-#define MP_WARRAY (1 << ((MP_SIZEOF_BITS(mp_word) - (2 * MP_DIGIT_BIT)) + 1))
+#define MP_WARRAY (int)(1 << ((MP_SIZEOF_BITS(mp_word) - (2 * (size_t)MP_DIGIT_BIT)) + 1))
#if defined(MP_16BIT)
typedef uint32_t mp_word;