diff --git a/rpcs3/util/atomic.hpp b/rpcs3/util/atomic.hpp index a79c1acbbc..79a212e7b4 100644 --- a/rpcs3/util/atomic.hpp +++ b/rpcs3/util/atomic.hpp @@ -637,7 +637,7 @@ struct atomic_storage : atomic_storage static inline bool compare_exchange(T& dest, T& comp, T exch) { struct alignas(16) llong2 { llong ll[2]; }; - const llong2 _exch = std::bit_cast(comp); + const llong2 _exch = std::bit_cast(exch); return _InterlockedCompareExchange128(reinterpret_cast(&dest), _exch.ll[1], _exch.ll[0], reinterpret_cast(&comp)) != 0; }