summaryrefslogtreecommitdiffstats
path: root/libtommath/tommath.h
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2005-05-10 17:20:39 (GMT)
committerKevin B Kenny <kennykb@acm.org>2005-05-10 17:20:39 (GMT)
commit5b510b75ec4a1d6fb55691bcf55dbf4b0b936624 (patch)
tree2a8c6a5370bc1ab79e9ed6d477146fe18604eb59 /libtommath/tommath.h
parent6bc86f4b98c36219302ec99939666f84264bc4da (diff)
downloadtcl-5b510b75ec4a1d6fb55691bcf55dbf4b0b936624.zip
tcl-5b510b75ec4a1d6fb55691bcf55dbf4b0b936624.tar.gz
tcl-5b510b75ec4a1d6fb55691bcf55dbf4b0b936624.tar.bz2
committed local libtommath changes from kennykb-numerics-branch back to the Tcl HEAD
Diffstat (limited to 'libtommath/tommath.h')
-rw-r--r--libtommath/tommath.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libtommath/tommath.h b/libtommath/tommath.h
index bcb9d86..ce8591f 100644
--- a/libtommath/tommath.h
+++ b/libtommath/tommath.h
@@ -217,7 +217,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] & 1) == 0)) ? MP_YES : MP_NO)
+#define mp_iseven(a) (((a)->used == 0 || (((a)->dp[0] & 1) == 0)) ? MP_YES : MP_NO)
#define mp_isodd(a) (((a)->used > 0 && (((a)->dp[0] & 1) == 1)) ? MP_YES : MP_NO)
/* set to zero */