authorgravatar for meyerja.2013@gmail.comJarrod Meyer <meyerja.2013@gmail.com> 2024-07-26 20:51:54-04:00
committergravatar for meyerja.2013@gmail.comJarrod Meyer <meyerja.2013@gmail.com> 2024-07-27 11:32:43-04:00
log7434accc3de5a40b4ebe26b7ed2fdcf13f7964e5
treebf76dc85cdb8342310f7b1861cb2937c94061fa1
parent66b71273a2555da23f6d706c22e3d85f43fe602b

windows: make the WaitForMultipleObjectsEx assertion inclusive

- additionally, the parameter must be nonzero: https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-waitformultipleobjects

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/os/windows.zig+1-1
...@@ -452,7 +452,7 @@ pub fn WaitForSingleObjectEx(handle: HANDLE, milliseconds: DWORD, alertable: boo...@@ -452,7 +452,7 @@ pub fn WaitForSingleObjectEx(handle: HANDLE, milliseconds: DWORD, alertable: boo
452}452}
453453
454pub fn WaitForMultipleObjectsEx(handles: []const HANDLE, waitAll: bool, milliseconds: DWORD, alertable: bool) !u32 {454pub fn WaitForMultipleObjectsEx(handles: []const HANDLE, waitAll: bool, milliseconds: DWORD, alertable: bool) !u32 {
455 assert(handles.len < MAXIMUM_WAIT_OBJECTS);455 assert(handles.len > 0 and handles.len <= MAXIMUM_WAIT_OBJECTS);
456 const nCount: DWORD = @as(DWORD, @intCast(handles.len));456 const nCount: DWORD = @as(DWORD, @intCast(handles.len));
457 switch (kernel32.WaitForMultipleObjectsEx(457 switch (kernel32.WaitForMultipleObjectsEx(
458 nCount,458 nCount,