Skip to content

Commit ac274bf

Browse files
committed
Fix x64 gmp init on platforms that define UL as 32 bits.
1 parent 920c243 commit ac274bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/field_gmp_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ void static secp256k1_fe_inner_start(void) {
1818
for (int i=0; i<(33+GMP_NUMB_BITS-1)/GMP_NUMB_BITS; i++)
1919
secp256k1_field_pc[i] = 0;
2020
secp256k1_field_pc[0] += 0x3D1UL;
21-
secp256k1_field_pc[32/GMP_NUMB_BITS] += (1UL << (32 % GMP_NUMB_BITS));
21+
secp256k1_field_pc[32/GMP_NUMB_BITS] += (((mp_limb_t)1) << (32 % GMP_NUMB_BITS));
2222
for (int i=0; i<FIELD_LIMBS; i++) {
2323
secp256k1_field_p[i] = 0;
2424
}

0 commit comments

Comments
 (0)