From 86029cde7caa7915247aad50720c59c7269f11ed Mon Sep 17 00:00:00 2001 From: Steven Noonan Date: Tue, 17 Aug 2021 18:29:41 -0700 Subject: [PATCH] ma_slot_allocator_free: use atomic load on allocator count Signed-off-by: Steven Noonan --- miniaudio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniaudio.h b/miniaudio.h index e33f25d3..05571870 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -38986,7 +38986,7 @@ MA_API ma_result ma_slot_allocator_free(ma_slot_allocator* pAllocator, ma_uint64 MA_ASSERT(iBit < 32); /* This must be true due to the logic we used to actually calculate it. */ - while (pAllocator->count > 0) { + while (c89atomic_load_i32(&pAllocator->count) > 0) { /* CAS */ ma_uint32 oldBitfield; ma_uint32 newBitfield;