Fix too-large shift in mceliece*f

This commit is contained in:
Thom Wiggers 2020-03-13 13:27:02 -04:00 提交者 Kris Kwiatkowski
父節點 c5f8131c8b
當前提交 fcd81030d6
共有 2 個檔案被更改,包括 2 行新增2 行删除

查看文件

@ -57,7 +57,7 @@ static inline int ctz(uint64_t in) {
int i, b, m = 0, r = 0;
for (i = 0; i < 64; i++) {
b = ((int)in >> i) & 1;
b = ((int)(in >> i)) & 1;
m |= b;
r += (m ^ 1) & (b ^ 1);
}

查看文件

@ -57,7 +57,7 @@ static inline int ctz(uint64_t in) {
int i, b, m = 0, r = 0;
for (i = 0; i < 64; i++) {
b = ((int)in >> i) & 1;
b = ((int)(in >> i)) & 1;
m |= b;
r += (m ^ 1) & (b ^ 1);
}