Fixing WaitForMultipleObjects

This commit is contained in:
Ben Vanik 2014-01-12 02:34:22 -08:00
parent 127595b48a
commit dbf1aa182e
2 changed files with 3 additions and 1 deletions

View File

@ -1152,6 +1152,8 @@ SHIM_CALL KeWaitForMultipleObjects_shim(
count, objects_ptr, wait_type, wait_reason, processor_mode,
alertable, timeout_ptr, wait_block_array_ptr);
XEASSERT(wait_type >= 0 && wait_type <= 1);
X_STATUS result = X_STATUS_SUCCESS;
XObject** objects = (XObject**)alloca(sizeof(XObject*) * count);

View File

@ -143,7 +143,7 @@ X_STATUS XObject::WaitMultiple(
DWORD result = WaitForMultipleObjectsEx(
count, wait_handles,
wait_type ? TRUE : FALSE, timeout_ms, alertable);
wait_type ? FALSE : TRUE, timeout_ms, alertable);
return result;
}