mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
Fix UB in BitField.h
This commit is contained in:
parent
d45d8eb4bc
commit
14b9b12211
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ struct bf_t : bf_base<T, N>
|
||||||
// Get bitmask of size N, at I pos
|
// Get bitmask of size N, at I pos
|
||||||
static constexpr utype data_mask()
|
static constexpr utype data_mask()
|
||||||
{
|
{
|
||||||
return static_cast<utype>(~utype{} >> (bf_t::bitmax - bf_t::bitsize) << bitpos);
|
return static_cast<utype>(static_cast<utype>(~utype{} >> (bf_t::bitmax - bf_t::bitsize)) << bitpos);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bitfield extraction helper
|
// Bitfield extraction helper
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue