mirror of
https://github.com/Z3Prover/z3
synced 2025-06-23 22:33:40 +00:00
fix a few undefined behaviors exposed by the unit tests
Signed-off-by: Nuno Lopes <nlopes@microsoft.com>
This commit is contained in:
parent
091ae37c06
commit
379ce66391
2 changed files with 3 additions and 3 deletions
|
@ -351,7 +351,7 @@ bool has_one_at_first_k_bits(unsigned sz, unsigned const * data, unsigned k) {
|
|||
}
|
||||
if (word_sz < sz) {
|
||||
unsigned bit_sz = k % (8 * sizeof(unsigned));
|
||||
unsigned mask = (1 << bit_sz) - 1;
|
||||
unsigned mask = (1u << bit_sz) - 1;
|
||||
return (data[word_sz] & mask) != 0;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue