Skip to content

Commit 2f24a39

Browse files
committed
std: fix windows.GetOverlappedResult
1 parent 40bcf25 commit 2f24a39

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/std/os/windows.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ pub fn DeviceIoControl(
141141

142142
pub fn GetOverlappedResult(h: HANDLE, overlapped: *OVERLAPPED, wait: bool) !DWORD {
143143
var bytes: DWORD = undefined;
144-
if (kernel32.GetOverlappedResult(h, overlapped, &bytes, wait) == 0) {
144+
if (kernel32.GetOverlappedResult(h, overlapped, &bytes, @boolToInt(wait)) == 0) {
145145
switch (kernel32.GetLastError()) {
146-
ERROR_IO_INCOMPLETE => if (!wait) return error.WouldBlock else unreachable,
146+
ERROR.IO_INCOMPLETE => if (!wait) return error.WouldBlock else unreachable,
147147
else => |err| return unexpectedError(err),
148148
}
149149
}

0 commit comments

Comments
 (0)