aboutsummaryrefslogtreecommitdiff
path: root/common/coroutines.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/coroutines.cpp')
-rw-r--r--common/coroutines.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/coroutines.cpp b/common/coroutines.cpp
index 042b15b5d7..7209ea3024 100644
--- a/common/coroutines.cpp
+++ b/common/coroutines.cpp
@@ -433,9 +433,9 @@ void CoroutineScheduler::waitForMultipleObjects(CORO_PARAM, int nCount, uint32 *
// Determine the signalled state
_ctx->pidSignalled = (_ctx->pProcess) || !_ctx->pEvent ? false : _ctx->pEvent->signalled;
- if (bWaitAll && _ctx->pidSignalled)
+ if (bWaitAll && !_ctx->pidSignalled)
_ctx->signalled = false;
- else if (!bWaitAll & _ctx->pidSignalled)
+ else if (!bWaitAll && _ctx->pidSignalled)
_ctx->signalled = true;
}
@@ -445,7 +445,7 @@ void CoroutineScheduler::waitForMultipleObjects(CORO_PARAM, int nCount, uint32 *
for (_ctx->i = 0; _ctx->i < nCount; ++_ctx->i) {
_ctx->pEvent = getEvent(pidList[_ctx->i]);
- if (_ctx->pEvent->manualReset)
+ if (!_ctx->pEvent->manualReset)
_ctx->pEvent->signalled = false;
}