aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/semaphore.cpp
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2017-01-01 19:07:37 -0500
committerSubv <subv2112@gmail.com>2017-01-05 13:00:05 -0500
commitf8d98e241dbcce00200d32c60eaf26e9147fe6d4 (patch)
tree285427693d6ba229c94148048c9a52a3b2c8b5de /src/core/hle/kernel/semaphore.cpp
parent35aea29a77b71be05a2708c6cc93205502bfede7 (diff)
Kernel/Semaphore: Fixed a regression in semaphore waits.
The regression was caused by a missing check in #2260. The new behavior is consistent with the real kernel.
Diffstat (limited to 'src/core/hle/kernel/semaphore.cpp')
-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;
}