bsnes/nall/primitives
Near 55e05c89c2 Fix critical undefined bit-shift length operation
Natural/Integer<T>.bit() (BitRange) was shifting by whatever type the source was to match the target bit length.
But this breaks when the target type is u64/s64 and the source type is u32/s32 or smaller. Shifting by >=32 becomes undefined behavior.
We have to cast the input source to the target type first, so that the source<<shift result is valid.
This is safe here regardless of source's signedness, because it's only used in =, &=, ^=, |= operations.
2021-04-14 22:55:36 +10:00
..
bit-field.hpp v108.9 2019-08-16 19:44:16 +09:00
bit-range.hpp Fix critical undefined bit-shift length operation 2021-04-14 22:55:36 +10:00
boolean.hpp Update to bsnes v107.1 release. 2019-04-09 11:16:30 +10:00
integer.hpp v108.9 2019-08-16 19:44:16 +09:00
literals.hpp Update to v106r79 release. 2019-01-15 15:33:20 +11:00
natural.hpp v108.9 2019-08-16 19:44:16 +09:00
real.hpp Update to bsnes v107.1 release. 2019-04-09 11:16:30 +10:00
types.hpp Update to v106r83 release. 2019-01-19 12:34:17 +11:00