Correctly initialize u64 mask

1 needs to be marked as long long, to allow shifting numbers >= 32.
Otherwise, 1 is an int, limited to 32 bits.
This commit is contained in:
Robert Schmidt
2024-12-11 16:15:07 +01:00
parent 054506f5ae
commit 42a10e4700
+1 -1
View File
@@ -452,7 +452,7 @@ static uint64_t get_u64_mask(const paramdef_t *pd)
for (int i = 0; i < pd->numelt; ++i) {
int num = pd->iptr[i];
AssertFatal(num >= 0 && num < 64, "cannot put element of %d in 64-bit mask\n", num);
mask |= 1 << num;
mask |= 1LL << num;
}
return mask;
}