Skip to content
Snippets Groups Projects
Commit 1d308c2e authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Half-assed error handling for unbalanced lock/unlock

parent 3f9faa65
Branches
Tags
1 merge request!455Update branch with changes from master
......@@ -117,8 +117,11 @@ rwlock_unlock(rwlock_t *lock)
LeaveCriticalSection(&lock->lk);
return false;
}
lock->readers--;
return true;
if (lock->readers) {
lock->readers--;
return true;
}
return false;
}
#elif defined(__unix__)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment