From f186e7bd834e8b333c93108141a855dcea7a1aa0 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Wed, 28 Nov 2018 10:51:30 +0100 Subject: [PATCH] bitwise operation on unsigned --- bn_mp_set_double.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bn_mp_set_double.c b/bn_mp_set_double.c index 5513af1..0e230c7 100644 --- a/bn_mp_set_double.c +++ b/bn_mp_set_double.c @@ -24,7 +24,7 @@ int mp_set_double(mp_int *a, double b) } cast; cast.dbl = b; - exp = (int)(cast.bits >> 52) & 0x7FF; + exp = (unsigned)(cast.bits >> 52) & 0x7FFU; frac = (cast.bits & ((1ULL << 52) - 1ULL)) | (1ULL << 52); if (exp == 0x7FF) { /* +-inf, NaN */