diff options
Diffstat (limited to 'libtommath/bn_mp_set_double.c')
-rw-r--r-- | libtommath/bn_mp_set_double.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libtommath/bn_mp_set_double.c b/libtommath/bn_mp_set_double.c index 76f6293..c96a3b3 100644 --- a/libtommath/bn_mp_set_double.c +++ b/libtommath/bn_mp_set_double.c @@ -41,8 +41,8 @@ int mp_set_double(mp_int *a, double b) return res; } - if (((cast.bits >> 63) != 0ULL) && (mp_iszero(a) == MP_NO)) { - SIGN(a) = MP_NEG; + if (((cast.bits >> 63) != 0ULL) && !IS_ZERO(a)) { + a->sign = MP_NEG; } return MP_OKAY; |