diff --git a/BPTCEncoder/src/BC7Compressor.cpp b/BPTCEncoder/src/BC7Compressor.cpp index 61e8eed..af73a18 100755 --- a/BPTCEncoder/src/BC7Compressor.cpp +++ b/BPTCEncoder/src/BC7Compressor.cpp @@ -1538,10 +1538,10 @@ namespace BC7C } static uint32 FetchAndAdd(uint32 *x) { - return InterlockedIncrement(x); + return InterlockedIncrement(x)-1; } - static void ResetTestAndSet(uint *x) { + static void ResetTestAndSet(uint32 *x) { *x = 0; } #elif defined HAS_GCC_ATOMICS