diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-11-17 11:03:39 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-11-17 11:03:39 (GMT) |
commit | 0804f008f2a4ae9667481215fae5a901a6466b94 (patch) | |
tree | 3937a9490b67c8e5a7c623e90280841cda244d2d | |
parent | c011864b3411bd607efb52ffd86bb9b91e8e1bf3 (diff) | |
parent | fe8f0c596ee02b8811d1d2f4d23b8fdbb166a2ed (diff) | |
download | tcl-0804f008f2a4ae9667481215fae5a901a6466b94.zip tcl-0804f008f2a4ae9667481215fae5a901a6466b94.tar.gz tcl-0804f008f2a4ae9667481215fae5a901a6466b94.tar.bz2 |
Bring in fix for mp_iseven().... almost missed that .... This should be given a dedicated test-case. Now everything taken from "gahr-ticket-e6f27aa56f" branch is handled.
-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) |