diff options
Diffstat (limited to 'compat/atomics/win32/stdatomic.h')
-rw-r--r-- | compat/atomics/win32/stdatomic.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compat/atomics/win32/stdatomic.h b/compat/atomics/win32/stdatomic.h index bdd3933..9cfdaa52 100644 --- a/compat/atomics/win32/stdatomic.h +++ b/compat/atomics/win32/stdatomic.h @@ -104,7 +104,8 @@ static inline int atomic_compare_exchange_strong(intptr_t *object, intptr_t *exp intptr_t desired) { intptr_t old = *expected; - *expected = InterlockedCompareExchangePointer(object, desired, old); + *expected = (intptr_t)InterlockedCompareExchangePointer( + (PVOID *)object, (PVOID)desired, (PVOID)old); return *expected == old; } |