diff options
| author | Tillmann Karras <tilkax@gmail.com> | 2022-05-03 22:01:33 +0100 |
|---|---|---|
| committer | Tillmann Karras <tilkax@gmail.com> | 2022-05-03 22:17:24 +0100 |
| commit | aee547aa0eb3bd274117616eddd036634bbe59de (patch) | |
| tree | 494d535baa6e08c266f85ed2ec48585a539773de /Source/Core | |
| parent | ded18ab61e722423ad2383cdb399a121864f30d0 (diff) | |
AX: prevent undefined behavior
u16 gets promoted to s32 where changing the uppermost bit is UB.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/HW/DSPHLE/UCodes/AXVoice.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/AXVoice.h b/Source/Core/Core/HW/DSPHLE/UCodes/AXVoice.h index d732cc066d..f40f17cb6d 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/AXVoice.h +++ b/Source/Core/Core/HW/DSPHLE/UCodes/AXVoice.h @@ -44,7 +44,7 @@ inline namespace AXWii namespace { // Useful macro to convert xxx_hi + xxx_lo to xxx for 32 bits. -#define HILO_TO_32(name) ((name##_hi << 16) | name##_lo) +#define HILO_TO_32(name) ((u32(name##_hi) << 16) | name##_lo) // Used to pass a large amount of buffers to the mixing function. union AXBuffers |
