1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-23 20:15:19 -07:00

Proper lock test on Windows

This commit is contained in:
Frank Denis 2016-04-26 01:43:00 +02:00
parent d908d08b0d
commit ffd5987e7c

View File

@ -83,7 +83,7 @@ static int
_sodium_crit_enter(void)
{
if (InterlockedCompareExchange(&_sodium_lock_initialized,
1L, 0L) != 0L) {
1L, 0L) == 0L) {
InitializeCriticalSection(_sodium_lock);
InterlockedIncrement(&_sodium_lock_initialized);
} else {