Преглед на файлове

Merge pull request #2396 from Subv/sema_acquire

Kernel/Semaphore: Fixed a regression in semaphore waits.
bunnei преди 9 години
родител
ревизия
59f4f1d7ff
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      src/core/hle/kernel/semaphore.cpp

+ 2 - 1
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;
 }