diff options
-rw-r--r-- | libtommath/tommath.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libtommath/tommath.h b/libtommath/tommath.h index 3865949..8293e01 100644 --- a/libtommath/tommath.h +++ b/libtommath/tommath.h @@ -208,7 +208,7 @@ int mp_init_size(mp_int *a, int size); /* ---> Basic Manipulations <--- */ #define mp_iszero(a) (((a)->used == 0) ? MP_YES : MP_NO) -#define mp_iseven(a) ((((a)->used > 0) && (((a)->dp[0] & 1u) == 0u)) ? MP_YES : MP_NO) +#define mp_iseven(a) ((((a)->used == 0) || (((a)->dp[0] & 1u) == 0u)) ? MP_YES : MP_NO) #define mp_isodd(a) ((((a)->used > 0) && (((a)->dp[0] & 1u) == 1u)) ? MP_YES : MP_NO) #define mp_isneg(a) (((a)->sign != MP_ZPOS) ? MP_YES : MP_NO) |