Skip to content

Commit

Permalink
AX: prevent undefined behavior
Browse files Browse the repository at this point in the history
u16 gets promoted to s32 where changing the uppermost bit is UB.
  • Loading branch information
Tilka committed May 3, 2022
1 parent ded18ab commit aee547a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Core/Core/HW/DSPHLE/UCodes/AXVoice.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit aee547a

Please sign in to comment.