Skip to content

Commit 1d8f367

Browse files
committed
Merge #1250: No need to subtract 1 before doing a right shift
3e43041 No need to subtract 1 before doing a right shift (roconnor-blockstream) Pull request description: ACKs for top commit: real-or-random: utACK 3e43041 jonasnick: ACK 3e43041 Tree-SHA512: bcecda11eae3fb845bef7af88c6171bedcd933872d08a9849c0a250cb6c9e982a88bd45e8a8364a4a348f8be413fc91ee04cf8fa78adae44e584e3ad7ec544cf
2 parents 464a911 + 3e43041 commit 1d8f367

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/int128_struct_impl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static SECP256K1_INLINE int secp256k1_i128_check_pow2(const secp256k1_int128 *r,
193193
VERIFY_CHECK(n < 127);
194194
VERIFY_CHECK(sign == 1 || sign == -1);
195195
return n >= 64 ? r->hi == (uint64_t)sign << (n - 64) && r->lo == 0
196-
: r->hi == (uint64_t)((sign - 1) >> 1) && r->lo == (uint64_t)sign << n;
196+
: r->hi == (uint64_t)(sign >> 1) && r->lo == (uint64_t)sign << n;
197197
}
198198

199199
#endif

0 commit comments

Comments
 (0)