diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig index ab3e817155a1875cc05d6a49b6bea3a22c8d4ca5..fbad21e90bf71807bd112bd6a9d0efb1317fa9cd 100644 --- a/lib/std/os/windows.zig +++ b/lib/std/os/windows.zig @@ -452,7 +452,7 @@ pub fn WaitForSingleObjectEx(handle: HANDLE, milliseconds: DWORD, alertable: boo } pub fn WaitForMultipleObjectsEx(handles: []const HANDLE, waitAll: bool, milliseconds: DWORD, alertable: bool) !u32 { - assert(handles.len < MAXIMUM_WAIT_OBJECTS); + assert(handles.len > 0 and handles.len <= MAXIMUM_WAIT_OBJECTS); const nCount: DWORD = @as(DWORD, @intCast(handles.len)); switch (kernel32.WaitForMultipleObjectsEx( nCount,