From ac274bff23d26c03057f202be391e565bc48a2c2 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Thu, 8 May 2014 10:28:20 -0700 Subject: [PATCH] Fix x64 gmp init on platforms that define UL as 32 bits. --- src/field_gmp_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/field_gmp_impl.h b/src/field_gmp_impl.h index 880c5a7265..3dbd7604b5 100644 --- a/src/field_gmp_impl.h +++ b/src/field_gmp_impl.h @@ -18,7 +18,7 @@ void static secp256k1_fe_inner_start(void) { for (int i=0; i<(33+GMP_NUMB_BITS-1)/GMP_NUMB_BITS; i++) secp256k1_field_pc[i] = 0; secp256k1_field_pc[0] += 0x3D1UL; - secp256k1_field_pc[32/GMP_NUMB_BITS] += (1UL << (32 % GMP_NUMB_BITS)); + secp256k1_field_pc[32/GMP_NUMB_BITS] += (((mp_limb_t)1) << (32 % GMP_NUMB_BITS)); for (int i=0; i