Fix for wolfcrypt/src/sp_int.c:2720:34: error: left shift count >= width of type with mingw64.

This commit is contained in:
David Garske
2021-06-29 09:13:32 -07:00
parent 08e560e0a7
commit a748b5264e

View File

@ -2717,7 +2717,7 @@ int sp_count_bits(const sp_int* a)
r *= SP_WORD_SIZE;
if (d > SP_HALF_MAX) {
r += SP_WORD_SIZE;
while ((d & (1UL << (SP_WORD_SIZE - 1))) == 0) {
while ((d & ((sp_digit)1 << (SP_WORD_SIZE - 1))) == 0) {
r--;
d <<= 1;
}