aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2017-01-06 22:00:12 -0500
committerGitHub <noreply@github.com>2017-01-06 22:00:12 -0500
commitba71c889f066245809e7df6c07fd7a458cce0bdb (patch)
tree1a27ed7ea423ae450a733b1b3c4c15ef97c64686 /src
parent82ed89eec23dda2d16edac12458efcadcf0b0f51 (diff)
parentf8d98e241dbcce00200d32c60eaf26e9147fe6d4 (diff)
Merge pull request #2396 from Subv/sema_acquire
Kernel/Semaphore: Fixed a regression in semaphore waits.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/semaphore.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/kernel/semaphore.cpp b/src/core/hle/kernel/semaphore.cpp
index 5e6139265d..8bda2f75df 100644
--- a/src/core/hle/kernel/semaphore.cpp
+++ b/src/core/hle/kernel/semaphore.cpp
@@ -35,7 +35,8 @@ bool Semaphore::ShouldWait(Thread* thread) const {
}
void Semaphore::Acquire(Thread* thread) {
- ASSERT_MSG(!ShouldWait(thread), "object unavailable!");
+ if (available_count <= 0)
+ return;
--available_count;
}