From ddf87864dead398b4f4db9c1368dff6bc62da9c1 Mon Sep 17 00:00:00 2001 From: Eladash Date: Sat, 15 Feb 2020 12:58:57 +0200 Subject: [PATCH] atomic_t: Fix regression from #7489 --- rpcs3/util/atomic.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }